drivers/video/backlight/atmel-pwm-bl.c: use module_platform_driver_probe()
authorJingoo Han <[email protected]>
Mon, 29 Apr 2013 23:17:28 +0000 (16:17 -0700)
committerLinus Torvalds <[email protected]>
Tue, 30 Apr 2013 01:28:14 +0000 (18:28 -0700)
Use the module_platform_driver_probe() macro which makes the code
smaller and simpler.

Signed-off-by: Jingoo Han <[email protected]>
Cc: Richard Purdie <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
drivers/video/backlight/atmel-pwm-bl.c

index de5e5e74e2a70531a03d8204c282df6cc0d25332..20b330dfbaabee4af4c02385a3f2a43c69adde14 100644 (file)
@@ -225,17 +225,7 @@ static struct platform_driver atmel_pwm_bl_driver = {
        .remove = __exit_p(atmel_pwm_bl_remove),
 };
 
-static int __init atmel_pwm_bl_init(void)
-{
-       return platform_driver_probe(&atmel_pwm_bl_driver, atmel_pwm_bl_probe);
-}
-module_init(atmel_pwm_bl_init);
-
-static void __exit atmel_pwm_bl_exit(void)
-{
-       platform_driver_unregister(&atmel_pwm_bl_driver);
-}
-module_exit(atmel_pwm_bl_exit);
+module_platform_driver_probe(atmel_pwm_bl_driver, atmel_pwm_bl_probe);
 
 MODULE_AUTHOR("Hans-Christian egtvedt <[email protected]>");
 MODULE_DESCRIPTION("Atmel PWM backlight driver");