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-rdc321x.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-rdc321x.c')
-rw-r--r-- | drivers/gpio/gpio-rdc321x.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/gpio/gpio-rdc321x.c b/drivers/gpio/gpio-rdc321x.c index 2762698e0204..e97016af6443 100644 --- a/drivers/gpio/gpio-rdc321x.c +++ b/drivers/gpio/gpio-rdc321x.c | |||
@@ -227,18 +227,7 @@ static struct platform_driver rdc321x_gpio_driver = { | |||
227 | .remove = __devexit_p(rdc321x_gpio_remove), | 227 | .remove = __devexit_p(rdc321x_gpio_remove), |
228 | }; | 228 | }; |
229 | 229 | ||
230 | static int __init rdc321x_gpio_init(void) | 230 | module_platform_driver(rdc321x_gpio_driver); |
231 | { | ||
232 | return platform_driver_register(&rdc321x_gpio_driver); | ||
233 | } | ||
234 | |||
235 | static void __exit rdc321x_gpio_exit(void) | ||
236 | { | ||
237 | platform_driver_unregister(&rdc321x_gpio_driver); | ||
238 | } | ||
239 | |||
240 | module_init(rdc321x_gpio_init); | ||
241 | module_exit(rdc321x_gpio_exit); | ||
242 | 231 | ||
243 | MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>"); | 232 | MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>"); |
244 | MODULE_DESCRIPTION("RDC321x GPIO driver"); | 233 | MODULE_DESCRIPTION("RDC321x GPIO driver"); |