diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-07 11:24:00 -0500 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-01-02 02:26:06 -0500 |
commit | 6f61415e9c4c0ab02c8eda7671bb652db4863cc0 (patch) | |
tree | 689e7f50b2d6de5a5a36d72b2ba72a742d39341c /drivers/gpio/gpio-adp5520.c | |
parent | f134759955bbb5bf28a8d2c6fe5aa201d1ffb860 (diff) |
gpio: Convert GPIO drivers to module_platform_driver
Where appropriate factor out some boilerplate code for platform device
registration into module_platform_driver. Drivers that don't use the
standard module_init initcall haven't been converted.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'drivers/gpio/gpio-adp5520.c')
-rw-r--r-- | drivers/gpio/gpio-adp5520.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/gpio/gpio-adp5520.c b/drivers/gpio/gpio-adp5520.c index 9f2781537001..2f263cc32561 100644 --- a/drivers/gpio/gpio-adp5520.c +++ b/drivers/gpio/gpio-adp5520.c | |||
@@ -193,17 +193,7 @@ static struct platform_driver adp5520_gpio_driver = { | |||
193 | .remove = __devexit_p(adp5520_gpio_remove), | 193 | .remove = __devexit_p(adp5520_gpio_remove), |
194 | }; | 194 | }; |
195 | 195 | ||
196 | static int __init adp5520_gpio_init(void) | 196 | module_platform_driver(adp5520_gpio_driver); |
197 | { | ||
198 | return platform_driver_register(&adp5520_gpio_driver); | ||
199 | } | ||
200 | module_init(adp5520_gpio_init); | ||
201 | |||
202 | static void __exit adp5520_gpio_exit(void) | ||
203 | { | ||
204 | platform_driver_unregister(&adp5520_gpio_driver); | ||
205 | } | ||
206 | module_exit(adp5520_gpio_exit); | ||
207 | 197 | ||
208 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); | 198 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |
209 | MODULE_DESCRIPTION("GPIO ADP5520 Driver"); | 199 | MODULE_DESCRIPTION("GPIO ADP5520 Driver"); |