Skip to contentSkip to conversation

misc: arm-charlcd: use module_platform_driver_probe()

PATCH In review Jingoo Han 3 participants 5 messages Mar 5, 2013

Subsystems (2)
lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/3 misc: arm-charlcd: use module_platform_driver_probe()

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

---
 drivers/misc/arm-charlcd.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/misc/arm-charlcd.c +1 -12
index fe8616a..48651ef 100644
@@ -378,18 +378,7 @@ static struct platform_driver charlcd_driver = {
 	.remove = __exit_p(charlcd_remove),
 };
 
-static int __init charlcd_init(void)
-{
-	return platform_driver_probe(&charlcd_driver, charlcd_probe);
-}
-
-static void __exit charlcd_exit(void)
-{
-	platform_driver_unregister(&charlcd_driver);
-}
-
-module_init(charlcd_init);
-module_exit(charlcd_exit);
+module_platform_driver_probe(charlcd_driver, charlcd_probe);
 
 MODULE_AUTHOR("Linus Walleij <[email protected]>");
 MODULE_DESCRIPTION("ARM Character LCD Driver");
Signature · 1 line
1.7.2.5
author
#1 lore raw

PATCH 2/3 misc: atmel_pwm: use module_platform_driver_probe()

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

---
 drivers/misc/atmel_pwm.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
drivers/misc/atmel_pwm.c +1 -11
index 28f5aaa..494d050 100644
@@ -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");
Signature · 1 line
1.7.2.5
author
#2 lore raw

PATCH 3/3 misc: ep93xx_pwm: use module_platform_driver_probe()

In reply to Jingoo Han

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

---
 drivers/misc/ep93xx_pwm.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/misc/ep93xx_pwm.c +1 -12
index 16d7179..96787ec 100644
@@ -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 <[email protected]>, "
 	      "H Hartley Sweeten <[email protected]>");
Signature · 1 line
1.7.2.5