aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpio/gpio-generic.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-07 11:24:00 -0500
committerGrant Likely <grant.likely@secretlab.ca>2012-01-02 02:26:06 -0500
commit6f61415e9c4c0ab02c8eda7671bb652db4863cc0 (patch)
tree689e7f50b2d6de5a5a36d72b2ba72a742d39341c /drivers/gpio/gpio-generic.c
parentf134759955bbb5bf28a8d2c6fe5aa201d1ffb860 (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-generic.c')
-rw-r--r--drivers/gpio/gpio-generic.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/gpio/gpio-generic.c b/drivers/gpio/gpio-generic.c
index 4e24436b0f82..e38dd0c31973 100644
--- a/drivers/gpio/gpio-generic.c
+++ b/drivers/gpio/gpio-generic.c
@@ -524,17 +524,7 @@ static struct platform_driver bgpio_driver = {
524 .remove = __devexit_p(bgpio_pdev_remove), 524 .remove = __devexit_p(bgpio_pdev_remove),
525}; 525};
526 526
527static int __init bgpio_platform_init(void) 527module_platform_driver(bgpio_driver);
528{
529 return platform_driver_register(&bgpio_driver);
530}
531module_init(bgpio_platform_init);
532
533static void __exit bgpio_platform_exit(void)
534{
535 platform_driver_unregister(&bgpio_driver);
536}
537module_exit(bgpio_platform_exit);
538 528
539#endif /* CONFIG_GPIO_GENERIC_PLATFORM */ 529#endif /* CONFIG_GPIO_GENERIC_PLATFORM */
540 530