From: Fabio Estevam Date: Tue, 24 Jul 2012 12:13:57 +0000 (+0200) Subject: i2c-smbus: Use module_i2c_driver() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fda2f4af37ccc80d655a5b4538288d461539b574;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git i2c-smbus: Use module_i2c_driver() Using module_i2c_driver() makes the code smaller and cleaner. Signed-off-by: Fabio Estevam Signed-off-by: Jean Delvare --- diff --git a/drivers/i2c/i2c-smbus.c b/drivers/i2c/i2c-smbus.c index 9836d08f7a77..df3e0bf31eb3 100644 --- a/drivers/i2c/i2c-smbus.c +++ b/drivers/i2c/i2c-smbus.c @@ -245,18 +245,7 @@ int i2c_handle_smbus_alert(struct i2c_client *ara) } EXPORT_SYMBOL_GPL(i2c_handle_smbus_alert); -static int __init i2c_smbus_init(void) -{ - return i2c_add_driver(&smbalert_driver); -} - -static void __exit i2c_smbus_exit(void) -{ - i2c_del_driver(&smbalert_driver); -} - -module_init(i2c_smbus_init); -module_exit(i2c_smbus_exit); +module_i2c_driver(smbalert_driver); MODULE_AUTHOR("Jean Delvare "); MODULE_DESCRIPTION("SMBus protocol extensions support");