misc: atmel_pwm: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Tue, 5 Mar 2013 02:03:18 +0000 (11:03 +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/atmel_pwm.c

index 28f5aaa19d4a289b8b0cf9241f42ab641e4051ca..494d0500bda6483a9f3d93f6287075d5f0825448 100644 (file)
@@ -393,17 +393,7 @@ static struct platform_driver atmel_pwm_driver = {
         */
 };
 
-static int __init pwm_init(void)
-{
-       return platform_driver_probe(&atmel_pwm_driver, pwm_probe);
-}
-module_init(pwm_init);
-
-static void __exit pwm_exit(void)
-{
-       platform_driver_unregister(&atmel_pwm_driver);
-}
-module_exit(pwm_exit);
+module_platform_driver_probe(atmel_pwm_driver, pwm_probe);
 
 MODULE_DESCRIPTION("Driver for AT32/AT91 PWM module");
 MODULE_LICENSE("GPL");