smb347-charger: Convert to use module_i2c_driver()
This reduces the amount of boilerplate code in the driver and makes it a bit simpler. Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Anton Vorontsov <anton.vorontsov@linaro.org>
This commit is contained in:
committed by
Anton Vorontsov
parent
e6fe3597fa
commit
b75ef1d807
@ -1285,17 +1285,7 @@ static struct i2c_driver smb347_driver = {
|
|||||||
.id_table = smb347_id,
|
.id_table = smb347_id,
|
||||||
};
|
};
|
||||||
|
|
||||||
static int __init smb347_init(void)
|
module_i2c_driver(smb347_driver);
|
||||||
{
|
|
||||||
return i2c_add_driver(&smb347_driver);
|
|
||||||
}
|
|
||||||
module_init(smb347_init);
|
|
||||||
|
|
||||||
static void __exit smb347_exit(void)
|
|
||||||
{
|
|
||||||
i2c_del_driver(&smb347_driver);
|
|
||||||
}
|
|
||||||
module_exit(smb347_exit);
|
|
||||||
|
|
||||||
MODULE_AUTHOR("Bruce E. Robertson <bruce.e.robertson@intel.com>");
|
MODULE_AUTHOR("Bruce E. Robertson <bruce.e.robertson@intel.com>");
|
||||||
MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
|
MODULE_AUTHOR("Mika Westerberg <mika.westerberg@linux.intel.com>");
|
||||||
|
Reference in New Issue
Block a user