aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c/i2c-core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/i2c-core.c')
-rw-r--r--drivers/i2c/i2c-core.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 82ea1b7ec91..ad68ac00d91 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -197,7 +197,7 @@ int i2c_add_adapter(struct i2c_adapter *adap)
197 /* inform drivers of new adapters */ 197 /* inform drivers of new adapters */
198 list_for_each(item,&drivers) { 198 list_for_each(item,&drivers) {
199 driver = list_entry(item, struct i2c_driver, list); 199 driver = list_entry(item, struct i2c_driver, list);
200 if (driver->flags & I2C_DF_NOTIFY) 200 if (driver->attach_adapter)
201 /* We ignore the return code; if it fails, too bad */ 201 /* We ignore the return code; if it fails, too bad */
202 driver->attach_adapter(adap); 202 driver->attach_adapter(adap);
203 } 203 }
@@ -309,7 +309,7 @@ int i2c_add_driver(struct i2c_driver *driver)
309 pr_debug("i2c-core: driver [%s] registered\n", driver->name); 309 pr_debug("i2c-core: driver [%s] registered\n", driver->name);
310 310
311 /* now look for instances of driver on our adapters */ 311 /* now look for instances of driver on our adapters */
312 if (driver->flags & I2C_DF_NOTIFY) { 312 if (driver->attach_adapter) {
313 list_for_each(item,&adapters) { 313 list_for_each(item,&adapters) {
314 adapter = list_entry(item, struct i2c_adapter, list); 314 adapter = list_entry(item, struct i2c_adapter, list);
315 driver->attach_adapter(adapter); 315 driver->attach_adapter(adapter);