From: Jingoo Han Date: Tue, 5 Mar 2013 02:02:21 +0000 (+0900) Subject: misc: arm-charlcd: use module_platform_driver_probe() X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=0c75948249a05ebfa3214aaf5b8247ec919c30ac;p=openwrt%2Fstaging%2Fblogic.git misc: arm-charlcd: use module_platform_driver_probe() This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler. Signed-off-by: Jingoo Han Acked-by: Linus Walleij Acked-by: Arnd Bergmann Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/misc/arm-charlcd.c b/drivers/misc/arm-charlcd.c index fe8616a8d287..48651ef0028c 100644 --- a/drivers/misc/arm-charlcd.c +++ b/drivers/misc/arm-charlcd.c @@ -378,18 +378,7 @@ static struct platform_driver charlcd_driver = { .remove = __exit_p(charlcd_remove), }; -static int __init charlcd_init(void) -{ - return platform_driver_probe(&charlcd_driver, charlcd_probe); -} - -static void __exit charlcd_exit(void) -{ - platform_driver_unregister(&charlcd_driver); -} - -module_init(charlcd_init); -module_exit(charlcd_exit); +module_platform_driver_probe(charlcd_driver, charlcd_probe); MODULE_AUTHOR("Linus Walleij "); MODULE_DESCRIPTION("ARM Character LCD Driver");