aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/i2c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/i2c-core.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/i2c/i2c-core.c b/drivers/i2c/i2c-core.c
index 7608df83d6d1..7bf38c418086 100644
--- a/drivers/i2c/i2c-core.c
+++ b/drivers/i2c/i2c-core.c
@@ -722,7 +722,8 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver)
722 722
723 INIT_LIST_HEAD(&driver->clients); 723 INIT_LIST_HEAD(&driver->clients);
724 /* Walk the adapters that are already present */ 724 /* Walk the adapters that are already present */
725 class_for_each_device(&i2c_adapter_class, driver, __attach_adapter); 725 class_for_each_device(&i2c_adapter_class, NULL, driver,
726 __attach_adapter);
726 727
727 mutex_unlock(&core_lock); 728 mutex_unlock(&core_lock);
728 return 0; 729 return 0;
@@ -782,7 +783,8 @@ void i2c_del_driver(struct i2c_driver *driver)
782{ 783{
783 mutex_lock(&core_lock); 784 mutex_lock(&core_lock);
784 785
785 class_for_each_device(&i2c_adapter_class, driver, __detach_adapter); 786 class_for_each_device(&i2c_adapter_class, NULL, driver,
787 __detach_adapter);
786 788
787 driver_unregister(&driver->driver); 789 driver_unregister(&driver->driver);
788 pr_debug("i2c-core: driver [%s] unregistered\n", driver->driver.name); 790 pr_debug("i2c-core: driver [%s] unregistered\n", driver->driver.name);