diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-12 14:32:04 -0500 |
---|---|---|
committer | Jean Delvare <khali@endymion.delvare> | 2012-01-12 14:32:04 -0500 |
commit | a3664b51c783aaa0dde1c95334d1a670d6d54590 (patch) | |
tree | 6b778b6f222800b761abcba0418a2b8d50718442 /drivers/i2c/busses/i2c-simtec.c | |
parent | a699ed6f1f977dcc4a49452a247cf21dc9cec3f9 (diff) |
i2c/busses: Use module_platform_driver()
Convert the drivers in drivers/i2c/busses/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Cc: Ben Dooks <ben-linux@fluff.org>
Acked-by: Jochen Friedrich <jochen@scram.de>
Acked-by: Peter Korsgaard <jacmet@sunsite.dk>
Acked-by: Wolfram Sang <w.sang@pengutronix.de>
Cc: Manuel Lauss <manuel.lauss@googlemail.com>
Cc: Barry Song <21cnbao@gmail.com>
Cc: Linus Walleij <linus.walleij@linaro.org>
Cc: Yong Zhang <yong.zhang0@gmail.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Grant Likely <grant.likely@secretlab.ca>
Cc: Samuel Ortiz <sameo@linux.intel.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Diffstat (limited to 'drivers/i2c/busses/i2c-simtec.c')
-rw-r--r-- | drivers/i2c/busses/i2c-simtec.c | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/drivers/i2c/busses/i2c-simtec.c b/drivers/i2c/busses/i2c-simtec.c index 2fc08fbf67a2..4fc87e7c94c9 100644 --- a/drivers/i2c/busses/i2c-simtec.c +++ b/drivers/i2c/busses/i2c-simtec.c | |||
@@ -156,12 +156,8 @@ static int simtec_i2c_remove(struct platform_device *dev) | |||
156 | return 0; | 156 | return 0; |
157 | } | 157 | } |
158 | 158 | ||
159 | |||
160 | /* device driver */ | 159 | /* device driver */ |
161 | 160 | ||
162 | /* work with hotplug and coldplug */ | ||
163 | MODULE_ALIAS("platform:simtec-i2c"); | ||
164 | |||
165 | static struct platform_driver simtec_i2c_driver = { | 161 | static struct platform_driver simtec_i2c_driver = { |
166 | .driver = { | 162 | .driver = { |
167 | .name = "simtec-i2c", | 163 | .name = "simtec-i2c", |
@@ -171,19 +167,9 @@ static struct platform_driver simtec_i2c_driver = { | |||
171 | .remove = simtec_i2c_remove, | 167 | .remove = simtec_i2c_remove, |
172 | }; | 168 | }; |
173 | 169 | ||
174 | static int __init i2c_adap_simtec_init(void) | 170 | module_platform_driver(simtec_i2c_driver); |
175 | { | ||
176 | return platform_driver_register(&simtec_i2c_driver); | ||
177 | } | ||
178 | |||
179 | static void __exit i2c_adap_simtec_exit(void) | ||
180 | { | ||
181 | platform_driver_unregister(&simtec_i2c_driver); | ||
182 | } | ||
183 | |||
184 | module_init(i2c_adap_simtec_init); | ||
185 | module_exit(i2c_adap_simtec_exit); | ||
186 | 171 | ||
187 | MODULE_DESCRIPTION("Simtec Generic I2C Bus driver"); | 172 | MODULE_DESCRIPTION("Simtec Generic I2C Bus driver"); |
188 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); | 173 | MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>"); |
189 | MODULE_LICENSE("GPL"); | 174 | MODULE_LICENSE("GPL"); |
175 | MODULE_ALIAS("platform:simtec-i2c"); | ||