aboutsummaryrefslogtreecommitdiffstats
path: root/sound/oss/dmasound/tas_common.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/oss/dmasound/tas_common.c')
-rw-r--r--sound/oss/dmasound/tas_common.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sound/oss/dmasound/tas_common.c b/sound/oss/dmasound/tas_common.c
index 11257600d6d0..b295ef682192 100644
--- a/sound/oss/dmasound/tas_common.c
+++ b/sound/oss/dmasound/tas_common.c
@@ -41,7 +41,6 @@
41 41
42static u8 tas_i2c_address = 0x34; 42static u8 tas_i2c_address = 0x34;
43static struct i2c_client *tas_client; 43static struct i2c_client *tas_client;
44static struct device_node* tas_node;
45 44
46static int tas_attach_adapter(struct i2c_adapter *); 45static int tas_attach_adapter(struct i2c_adapter *);
47static int tas_detach_client(struct i2c_client *); 46static int tas_detach_client(struct i2c_client *);
@@ -191,13 +190,14 @@ int __init
191tas_init(int driver_id, const char *driver_name) 190tas_init(int driver_id, const char *driver_name)
192{ 191{
193 const u32* paddr; 192 const u32* paddr;
193 struct device_node *tas_node;
194 194
195 printk(KERN_INFO "tas driver [%s])\n", driver_name); 195 printk(KERN_INFO "tas driver [%s])\n", driver_name);
196 196
197#ifndef CONFIG_I2C_POWERMAC 197#ifndef CONFIG_I2C_POWERMAC
198 request_module("i2c-powermac"); 198 request_module("i2c-powermac");
199#endif 199#endif
200 tas_node = find_devices("deq"); 200 tas_node = of_find_node_by_name("deq");
201 if (tas_node == NULL) 201 if (tas_node == NULL)
202 return -ENODEV; 202 return -ENODEV;
203 paddr = of_get_property(tas_node, "i2c-address", NULL); 203 paddr = of_get_property(tas_node, "i2c-address", NULL);
@@ -208,6 +208,7 @@ tas_init(int driver_id, const char *driver_name)
208 } else 208 } else
209 printk(KERN_INFO "using i2c address: 0x%x (default)\n", 209 printk(KERN_INFO "using i2c address: 0x%x (default)\n",
210 tas_i2c_address); 210 tas_i2c_address);
211 of_node_put(tas_node);
211 212
212 return i2c_add_driver(&tas_driver); 213 return i2c_add_driver(&tas_driver);
213} 214}