From 6f61415e9c4c0ab02c8eda7671bb652db4863cc0 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Thu, 8 Dec 2011 00:24:00 +0800 Subject: 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 Signed-off-by: Grant Likely --- drivers/gpio/gpio-da9052.c | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) (limited to 'drivers/gpio/gpio-da9052.c') 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 "); MODULE_DESCRIPTION("DA9052 GPIO Device Driver"); -- cgit