]> git.karo-electronics.de Git - linux-beck.git/commitdiff
misc: ep93xx_pwm: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Tue, 5 Mar 2013 02:04:07 +0000 (11:04 +0900)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 15 Mar 2013 18:10:49 +0000 (11:10 -0700)
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/misc/ep93xx_pwm.c

index 16d7179e2f9b8dd5005a2a62952abb6c10e20f2f..96787ec15caddb534efac6f2b2a9a162b6487617 100644 (file)
@@ -365,18 +365,7 @@ static struct platform_driver ep93xx_pwm_driver = {
        .remove         = __exit_p(ep93xx_pwm_remove),
 };
 
-static int __init ep93xx_pwm_init(void)
-{
-       return platform_driver_probe(&ep93xx_pwm_driver, ep93xx_pwm_probe);
-}
-
-static void __exit ep93xx_pwm_exit(void)
-{
-       platform_driver_unregister(&ep93xx_pwm_driver);
-}
-
-module_init(ep93xx_pwm_init);
-module_exit(ep93xx_pwm_exit);
+module_platform_driver_probe(ep93xx_pwm_driver, ep93xx_pwm_probe);
 
 MODULE_AUTHOR("Matthieu Crapet <mcrapet@gmail.com>, "
              "H Hartley Sweeten <hsweeten@visionengravers.com>");