summaryrefslogtreecommitdiffstats
path: root/drivers/misc/atmel_pwm.c
diff options
context:
space:
mode:
authorJingoo Han <jg1.han@samsung.com>2013-03-05 03:03:18 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-15 19:10:49 +0100
commit4022ed5a7222a400f813cfecfa5ecca40c708f69 (patch)
tree5d39ee3b41437c358bc6f7358971a86d2d12eff2 /drivers/misc/atmel_pwm.c
parentmisc: arm-charlcd: use module_platform_driver_probe() (diff)
downloadlinux-4022ed5a7222a400f813cfecfa5ecca40c708f69.tar.xz
linux-4022ed5a7222a400f813cfecfa5ecca40c708f69.zip
misc: atmel_pwm: 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 <jg1.han@samsung.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/atmel_pwm.c')
-rw-r--r--drivers/misc/atmel_pwm.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/drivers/misc/atmel_pwm.c b/drivers/misc/atmel_pwm.c
index 28f5aaa19d4a..494d0500bda6 100644
--- a/drivers/misc/atmel_pwm.c
+++ b/drivers/misc/atmel_pwm.c
@@ -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");