From: Sachin Kamat Date: Fri, 15 Mar 2013 11:40:28 +0000 (+0530) Subject: mfd: adp5520: Use module_i2c_driver() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=099bb952b064aebd76b30ca25b51ff6440663195;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git mfd: adp5520: Use module_i2c_driver() module_i2c_driver() removes some boilerplate and makes the code simple. Signed-off-by: Sachin Kamat Acked-by: Michael Hennerich Signed-off-by: Samuel Ortiz --- diff --git a/drivers/mfd/adp5520.c b/drivers/mfd/adp5520.c index 210dd038bb5a..5ab021f4f6df 100644 --- a/drivers/mfd/adp5520.c +++ b/drivers/mfd/adp5520.c @@ -360,17 +360,7 @@ static struct i2c_driver adp5520_driver = { .id_table = adp5520_id, }; -static int __init adp5520_init(void) -{ - return i2c_add_driver(&adp5520_driver); -} -module_init(adp5520_init); - -static void __exit adp5520_exit(void) -{ - i2c_del_driver(&adp5520_driver); -} -module_exit(adp5520_exit); +module_i2c_driver(adp5520_driver); MODULE_AUTHOR("Michael Hennerich "); MODULE_DESCRIPTION("ADP5520(01) PMIC-MFD Driver");