summaryrefslogtreecommitdiffstats
path: root/drivers/macintosh/windfarm_fcu_controls.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-10-08 05:00:04 +0200
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-11-15 02:59:30 +0100
commitf7fb862b843269d02a2fa75e4bbb49603f801b88 (patch)
treed3aa21750976a1fe81f0d91e6e1497d540a470a3 /drivers/macintosh/windfarm_fcu_controls.c
parentpowerpc: Add asm/debug.h to get powerpc_debugfs_root (diff)
downloadlinux-f7fb862b843269d02a2fa75e4bbb49603f801b88.tar.xz
linux-f7fb862b843269d02a2fa75e4bbb49603f801b88.zip
powerpc/windfarm: Use module_i2c_driver to simplify the code
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: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Diffstat (limited to 'drivers/macintosh/windfarm_fcu_controls.c')
-rw-r--r--drivers/macintosh/windfarm_fcu_controls.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/drivers/macintosh/windfarm_fcu_controls.c b/drivers/macintosh/windfarm_fcu_controls.c
index b3411edb324b..fd6ed15a979d 100644
--- a/drivers/macintosh/windfarm_fcu_controls.c
+++ b/drivers/macintosh/windfarm_fcu_controls.c
@@ -593,19 +593,7 @@ static struct i2c_driver wf_fcu_driver = {
.id_table = wf_fcu_id,
};
-static int __init wf_fcu_init(void)
-{
- return i2c_add_driver(&wf_fcu_driver);
-}
-
-static void __exit wf_fcu_exit(void)
-{
- i2c_del_driver(&wf_fcu_driver);
-}
-
-
-module_init(wf_fcu_init);
-module_exit(wf_fcu_exit);
+module_i2c_driver(wf_fcu_driver);
MODULE_AUTHOR("Benjamin Herrenschmidt <benh@kernel.crashing.org>");
MODULE_DESCRIPTION("FCU control objects for PowerMacs thermal control");