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/gpio/gpio-sch.c | |
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/gpio/gpio-sch.c')
-rw-r--r-- | drivers/gpio/gpio-sch.c | 13 |
1 files changed, 1 insertions, 12 deletions
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"); |