summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-cs5535.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-08 00:24:00 +0800
committerGrant Likely <grant.likely@secretlab.ca>2012-01-02 00:26:06 -0700
commit6f61415e9c4c0ab02c8eda7671bb652db4863cc0 (patch)
tree689e7f50b2d6de5a5a36d72b2ba72a742d39341c /drivers/gpio/gpio-cs5535.c
parentf134759955bbb5bf28a8d2c6fe5aa201d1ffb860 (diff)
downloadlwn-6f61415e9c4c0ab02c8eda7671bb652db4863cc0.tar.gz
lwn-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-cs5535.c')
-rw-r--r--drivers/gpio/gpio-cs5535.c13
1 files changed, 1 insertions, 12 deletions
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");