mfd: adp5520: Use module_i2c_driver()
authorSachin Kamat <sachin.kamat@linaro.org>
Fri, 15 Mar 2013 11:40:28 +0000 (17:10 +0530)
committerSamuel Ortiz <sameo@linux.intel.com>
Mon, 8 Apr 2013 09:21:14 +0000 (11:21 +0200)
module_i2c_driver() removes some boilerplate and makes the code
simple.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Michael Hennerich <michael.hennerich@analog.com>
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
drivers/mfd/adp5520.c

index 210dd038bb5a464f36b9c234f4087c42271deebe..5ab021f4f6df6218de72b81a61eb560ffb49ebc3 100644 (file)
@@ -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 <hennerich@blackfin.uclinux.org>");
 MODULE_DESCRIPTION("ADP5520(01) PMIC-MFD Driver");