Skip to contentSkip to conversation

backlight: atmel-pwm-bl: use module_platform_driver_probe()

PATCH New Jingoo Han 1 participant 1 message Mar 4, 2013

Subsystems (3)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/1 backlight: atmel-pwm-bl: use module_platform_driver_probe()

This patch uses module_platform_driver_probe() macro which makes the code smaller and simpler.

---
 drivers/video/backlight/atmel-pwm-bl.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
drivers/video/backlight/atmel-pwm-bl.c +1 -11
index de5e5e7..20b330d 100644
@@ -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");
Signature · 1 line
1.7.2.5