summaryrefslogtreecommitdiff
path: root/drivers/macintosh/windfarm_smu_sat.c
diff options
context:
space:
mode:
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>2012-10-08 07:00:04 +0400
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>2012-11-15 05:59:30 +0400
commitf7fb862b843269d02a2fa75e4bbb49603f801b88 (patch)
treed3aa21750976a1fe81f0d91e6e1497d540a470a3 /drivers/macintosh/windfarm_smu_sat.c
parent0dc3289c797ef9558af566802429212e0b58a5d9 (diff)
downloadlinux-f7fb862b843269d02a2fa75e4bbb49603f801b88.tar.xz
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_smu_sat.c')
-rw-r--r--drivers/macintosh/windfarm_smu_sat.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/macintosh/windfarm_smu_sat.c b/drivers/macintosh/windfarm_smu_sat.c
index 426e810233d7..d87f5ee04ca9 100644
--- a/drivers/macintosh/windfarm_smu_sat.c
+++ b/drivers/macintosh/windfarm_smu_sat.c
@@ -364,18 +364,7 @@ static struct i2c_driver wf_sat_driver = {
.id_table = wf_sat_id,
};
-static int __init sat_sensors_init(void)
-{
- return i2c_add_driver(&wf_sat_driver);
-}
-
-static void __exit sat_sensors_exit(void)
-{
- i2c_del_driver(&wf_sat_driver);
-}
-
-module_init(sat_sensors_init);
-module_exit(sat_sensors_exit);
+module_i2c_driver(wf_sat_driver);
MODULE_AUTHOR("Paul Mackerras <paulus@samba.org>");
MODULE_DESCRIPTION("SMU satellite sensors for PowerMac thermal control");