Loading drivers/i2c/i2c-core.c +5 −6 Original line number Original line Diff line number Diff line Loading @@ -288,9 +288,7 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver) { { struct list_head *item; struct list_head *item; struct i2c_adapter *adapter; struct i2c_adapter *adapter; int res = 0; int res; mutex_lock(&core_lists); /* add the driver to the list of i2c drivers in the driver core */ /* add the driver to the list of i2c drivers in the driver core */ driver->driver.owner = owner; driver->driver.owner = owner; Loading @@ -298,7 +296,9 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver) res = driver_register(&driver->driver); res = driver_register(&driver->driver); if (res) if (res) goto out_unlock; return res; mutex_lock(&core_lists); list_add_tail(&driver->list,&drivers); list_add_tail(&driver->list,&drivers); pr_debug("i2c-core: driver [%s] registered\n", driver->driver.name); pr_debug("i2c-core: driver [%s] registered\n", driver->driver.name); Loading @@ -311,9 +311,8 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver) } } } } out_unlock: mutex_unlock(&core_lists); mutex_unlock(&core_lists); return res; return 0; } } EXPORT_SYMBOL(i2c_register_driver); EXPORT_SYMBOL(i2c_register_driver); Loading Loading
drivers/i2c/i2c-core.c +5 −6 Original line number Original line Diff line number Diff line Loading @@ -288,9 +288,7 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver) { { struct list_head *item; struct list_head *item; struct i2c_adapter *adapter; struct i2c_adapter *adapter; int res = 0; int res; mutex_lock(&core_lists); /* add the driver to the list of i2c drivers in the driver core */ /* add the driver to the list of i2c drivers in the driver core */ driver->driver.owner = owner; driver->driver.owner = owner; Loading @@ -298,7 +296,9 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver) res = driver_register(&driver->driver); res = driver_register(&driver->driver); if (res) if (res) goto out_unlock; return res; mutex_lock(&core_lists); list_add_tail(&driver->list,&drivers); list_add_tail(&driver->list,&drivers); pr_debug("i2c-core: driver [%s] registered\n", driver->driver.name); pr_debug("i2c-core: driver [%s] registered\n", driver->driver.name); Loading @@ -311,9 +311,8 @@ int i2c_register_driver(struct module *owner, struct i2c_driver *driver) } } } } out_unlock: mutex_unlock(&core_lists); mutex_unlock(&core_lists); return res; return 0; } } EXPORT_SYMBOL(i2c_register_driver); EXPORT_SYMBOL(i2c_register_driver); Loading