powerpc/83xx: use module_i2c_driver to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Mon, 8 Oct 2012 12:39:52 +0000 (20:39 +0800)
committerScott Wood <scottwood@freescale.com>
Tue, 25 Jun 2013 21:34:11 +0000 (16:34 -0500)
Use the module_i2c_driver() macro to make the code smaller
and a bit simpler.

dpatch engine is used to auto generate this patch.
(https://github.com/weiyj/dpatch)

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Scott Wood <scottwood@freescale.com>
arch/powerpc/platforms/83xx/mcu_mpc8349emitx.c

index 624cb51..7bc3158 100644 (file)
@@ -231,17 +231,7 @@ static struct i2c_driver mcu_driver = {
        .id_table = mcu_ids,
 };
 
-static int __init mcu_init(void)
-{
-       return i2c_add_driver(&mcu_driver);
-}
-module_init(mcu_init);
-
-static void __exit mcu_exit(void)
-{
-       i2c_del_driver(&mcu_driver);
-}
-module_exit(mcu_exit);
+module_i2c_driver(mcu_driver);
 
 MODULE_DESCRIPTION("Power Management and GPIO expander driver for "
                   "MPC8349E-mITX-compatible MCU");