diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-12-07 17:24:00 +0100 |
---|---|---|
committer | Grant Likely <grant.likely@secretlab.ca> | 2012-01-02 08:26:06 +0100 |
commit | 6f61415e9c4c0ab02c8eda7671bb652db4863cc0 (patch) | |
tree | 689e7f50b2d6de5a5a36d72b2ba72a742d39341c /drivers | |
parent | gpio: Fix typo in comment in Samsung driver (diff) | |
download | linux-6f61415e9c4c0ab02c8eda7671bb652db4863cc0.tar.xz linux-6f61415e9c4c0ab02c8eda7671bb652db4863cc0.zip |
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')
-rw-r--r-- | drivers/gpio/gpio-adp5520.c | 12 | ||||
-rw-r--r-- | drivers/gpio/gpio-cs5535.c | 13 | ||||
-rw-r--r-- | drivers/gpio/gpio-da9052.c | 12 | ||||
-rw-r--r-- | drivers/gpio/gpio-generic.c | 12 | ||||
-rw-r--r-- | drivers/gpio/gpio-janz-ttl.c | 13 | ||||
-rw-r--r-- | drivers/gpio/gpio-rdc321x.c | 13 | ||||
-rw-r--r-- | drivers/gpio/gpio-sch.c | 13 | ||||
-rw-r--r-- | drivers/gpio/gpio-timberdale.c | 13 | ||||
-rw-r--r-- | drivers/gpio/gpio-ucb1400.c | 13 | ||||
-rw-r--r-- | drivers/gpio/gpio-vr41xx.c | 13 | ||||
-rw-r--r-- | drivers/gpio/gpio-vx855.c | 12 |
11 files changed, 11 insertions, 128 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 = { .remove = __devexit_p(adp5520_gpio_remove), }; -static int __init adp5520_gpio_init(void) -{ - return platform_driver_register(&adp5520_gpio_driver); -} -module_init(adp5520_gpio_init); - -static void __exit adp5520_gpio_exit(void) -{ - platform_driver_unregister(&adp5520_gpio_driver); -} -module_exit(adp5520_gpio_exit); +module_platform_driver(adp5520_gpio_driver); MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); MODULE_DESCRIPTION("GPIO ADP5520 Driver"); diff --git a/drivers/gpio/gpio-cs5535.c b/drivers/gpio/gpio-cs5535.c index 693a81beb3c7..19eda1bbe343 100644 --- a/drivers/gpio/gpio-cs5535.c +++ b/drivers/gpio/gpio-cs5535.c @@ -381,18 +381,7 @@ static struct platform_driver cs5535_gpio_driver = { .remove = __devexit_p(cs5535_gpio_remove), }; -static int __init cs5535_gpio_init(void) -{ - return platform_driver_register(&cs5535_gpio_driver); -} - -static void __exit cs5535_gpio_exit(void) -{ - platform_driver_unregister(&cs5535_gpio_driver); -} - -module_init(cs5535_gpio_init); -module_exit(cs5535_gpio_exit); +module_platform_driver(cs5535_gpio_driver); MODULE_AUTHOR("Andres Salomon <dilinger@queued.net>"); MODULE_DESCRIPTION("AMD CS5535/CS5536 GPIO driver"); diff --git a/drivers/gpio/gpio-da9052.c b/drivers/gpio/gpio-da9052.c index 038f5eb8b13d..58ac3777f0c4 100644 --- a/drivers/gpio/gpio-da9052.c +++ b/drivers/gpio/gpio-da9052.c @@ -259,17 +259,7 @@ static struct platform_driver da9052_gpio_driver = { }, }; -static int __init da9052_gpio_init(void) -{ - return platform_driver_register(&da9052_gpio_driver); -} -module_init(da9052_gpio_init); - -static void __exit da9052_gpio_exit(void) -{ - return platform_driver_unregister(&da9052_gpio_driver); -} -module_exit(da9052_gpio_exit); +module_platform_driver(da9052_gpio_driver); MODULE_AUTHOR("David Dajun Chen <dchen@diasemi.com>"); MODULE_DESCRIPTION("DA9052 GPIO Device Driver"); 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 = { .remove = __devexit_p(bgpio_pdev_remove), }; -static int __init bgpio_platform_init(void) -{ - return platform_driver_register(&bgpio_driver); -} -module_init(bgpio_platform_init); - -static void __exit bgpio_platform_exit(void) -{ - platform_driver_unregister(&bgpio_driver); -} -module_exit(bgpio_platform_exit); +module_platform_driver(bgpio_driver); #endif /* CONFIG_GPIO_GENERIC_PLATFORM */ diff --git a/drivers/gpio/gpio-janz-ttl.c b/drivers/gpio/gpio-janz-ttl.c index 6f7fda0b61ab..f2f000dd70b3 100644 --- a/drivers/gpio/gpio-janz-ttl.c +++ b/drivers/gpio/gpio-janz-ttl.c @@ -237,20 +237,9 @@ static struct platform_driver ttl_driver = { .remove = __devexit_p(ttl_remove), }; -static int __init ttl_init(void) -{ - return platform_driver_register(&ttl_driver); -} - -static void __exit ttl_exit(void) -{ - platform_driver_unregister(&ttl_driver); -} +module_platform_driver(ttl_driver); MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>"); MODULE_DESCRIPTION("Janz MODULbus VMOD-TTL Driver"); MODULE_LICENSE("GPL"); MODULE_ALIAS("platform:janz-ttl"); - -module_init(ttl_init); -module_exit(ttl_exit); 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 = { .remove = __devexit_p(rdc321x_gpio_remove), }; -static int __init rdc321x_gpio_init(void) -{ - return platform_driver_register(&rdc321x_gpio_driver); -} - -static void __exit rdc321x_gpio_exit(void) -{ - platform_driver_unregister(&rdc321x_gpio_driver); -} - -module_init(rdc321x_gpio_init); -module_exit(rdc321x_gpio_exit); +module_platform_driver(rdc321x_gpio_driver); MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>"); MODULE_DESCRIPTION("RDC321x GPIO driver"); diff --git a/drivers/gpio/gpio-sch.c b/drivers/gpio/gpio-sch.c index 163515845494..8cadf4d683a8 100644 --- a/drivers/gpio/gpio-sch.c +++ b/drivers/gpio/gpio-sch.c @@ -297,18 +297,7 @@ static struct platform_driver sch_gpio_driver = { .remove = __devexit_p(sch_gpio_remove), }; -static int __init sch_gpio_init(void) -{ - return platform_driver_register(&sch_gpio_driver); -} - -static void __exit sch_gpio_exit(void) -{ - platform_driver_unregister(&sch_gpio_driver); -} - -module_init(sch_gpio_init); -module_exit(sch_gpio_exit); +module_platform_driver(sch_gpio_driver); MODULE_AUTHOR("Denis Turischev <denis@compulab.co.il>"); MODULE_DESCRIPTION("GPIO interface for Intel Poulsbo SCH"); diff --git a/drivers/gpio/gpio-timberdale.c b/drivers/gpio/gpio-timberdale.c index c593bd46bfb6..031c6adf5b65 100644 --- a/drivers/gpio/gpio-timberdale.c +++ b/drivers/gpio/gpio-timberdale.c @@ -359,18 +359,7 @@ static struct platform_driver timbgpio_platform_driver = { /*--------------------------------------------------------------------------*/ -static int __init timbgpio_init(void) -{ - return platform_driver_register(&timbgpio_platform_driver); -} - -static void __exit timbgpio_exit(void) -{ - platform_driver_unregister(&timbgpio_platform_driver); -} - -module_init(timbgpio_init); -module_exit(timbgpio_exit); +module_platform_driver(timbgpio_platform_driver); MODULE_DESCRIPTION("Timberdale GPIO driver"); MODULE_LICENSE("GPL v2"); diff --git a/drivers/gpio/gpio-ucb1400.c b/drivers/gpio/gpio-ucb1400.c index 50e6bd1392ce..26405efe0f9f 100644 --- a/drivers/gpio/gpio-ucb1400.c +++ b/drivers/gpio/gpio-ucb1400.c @@ -103,23 +103,12 @@ static struct platform_driver ucb1400_gpio_driver = { }, }; -static int __init ucb1400_gpio_init(void) -{ - return platform_driver_register(&ucb1400_gpio_driver); -} - -static void __exit ucb1400_gpio_exit(void) -{ - platform_driver_unregister(&ucb1400_gpio_driver); -} - void __init ucb1400_gpio_set_data(struct ucb1400_gpio_data *data) { ucbdata = data; } -module_init(ucb1400_gpio_init); -module_exit(ucb1400_gpio_exit); +module_platform_driver(ucb1400_gpio_driver); MODULE_DESCRIPTION("Philips UCB1400 GPIO driver"); MODULE_LICENSE("GPL"); diff --git a/drivers/gpio/gpio-vr41xx.c b/drivers/gpio/gpio-vr41xx.c index 98723cb9ac68..82d5c20ad3cb 100644 --- a/drivers/gpio/gpio-vr41xx.c +++ b/drivers/gpio/gpio-vr41xx.c @@ -571,15 +571,4 @@ static struct platform_driver giu_device_driver = { }, }; -static int __init vr41xx_giu_init(void) -{ - return platform_driver_register(&giu_device_driver); -} - -static void __exit vr41xx_giu_exit(void) -{ - platform_driver_unregister(&giu_device_driver); -} - -module_init(vr41xx_giu_init); -module_exit(vr41xx_giu_exit); +module_platform_driver(giu_device_driver); diff --git a/drivers/gpio/gpio-vx855.c b/drivers/gpio/gpio-vx855.c index ef5aabd8b8b7..76ebfe5ff702 100644 --- a/drivers/gpio/gpio-vx855.c +++ b/drivers/gpio/gpio-vx855.c @@ -315,17 +315,7 @@ static struct platform_driver vx855gpio_driver = { .remove = __devexit_p(vx855gpio_remove), }; -static int vx855gpio_init(void) -{ - return platform_driver_register(&vx855gpio_driver); -} -module_init(vx855gpio_init); - -static void vx855gpio_exit(void) -{ - platform_driver_unregister(&vx855gpio_driver); -} -module_exit(vx855gpio_exit); +module_platform_driver(vx855gpio_driver); MODULE_LICENSE("GPL"); MODULE_AUTHOR("Harald Welte <HaraldWelte@viatech.com>"); |