Skip to contentSkip to conversation

mfd: ab3100-otp: use module_platform_driver_probe()

PATCH In review Jingoo Han 3 participants 5 messages Mar 5, 2013 – Apr 5, 2013 Multifunction devices (MFD)

lore
Share & tools
lore

Jingoo Han

author
#0 lore raw

PATCH 1/3 mfd: ab3100-otp: use module_platform_driver_probe()

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

---
 drivers/mfd/ab3100-otp.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)
drivers/mfd/ab3100-otp.c +1 -13
index 8440010..d7ce016 100644
@@ -248,19 +248,7 @@ static struct platform_driver ab3100_otp_driver = {
 	.remove	 = __exit_p(ab3100_otp_remove),
 };
 
-static int __init ab3100_otp_init(void)
-{
-	return platform_driver_probe(&ab3100_otp_driver,
-				     ab3100_otp_probe);
-}
-
-static void __exit ab3100_otp_exit(void)
-{
-	platform_driver_unregister(&ab3100_otp_driver);
-}
-
-module_init(ab3100_otp_init);
-module_exit(ab3100_otp_exit);
+module_platform_driver_probe(ab3100_otp_driver, ab3100_otp_probe);
 
 MODULE_AUTHOR("Linus Walleij <[email protected]>");
 MODULE_DESCRIPTION("AB3100 OTP Readout Driver");
Signature · 1 line
1.7.2.5
author
#1 lore raw

PATCH 2/3 mfd: htc-pasic3: use module_platform_driver_probe()

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

---
 drivers/mfd/htc-pasic3.c |   13 +------------
 1 files changed, 1 insertions(+), 12 deletions(-)
drivers/mfd/htc-pasic3.c +1 -12
index 9e5453d..0285fce 100644
@@ -208,18 +208,7 @@ static struct platform_driver pasic3_driver = {
 	.remove		= pasic3_remove,
 };
 
-static int __init pasic3_base_init(void)
-{
-	return platform_driver_probe(&pasic3_driver, pasic3_probe);
-}
-
-static void __exit pasic3_base_exit(void)
-{
-	platform_driver_unregister(&pasic3_driver);
-}
-
-module_init(pasic3_base_init);
-module_exit(pasic3_base_exit);
+module_platform_driver_probe(pasic3_driver, pasic3_probe);
 
 MODULE_AUTHOR("Philipp Zabel <[email protected]>");
 MODULE_DESCRIPTION("Core driver for HTC PASIC3");
Signature · 1 line
1.7.2.5
author
#2 lore raw

PATCH 3/3 mfd: davinci_voicecodec: 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/mfd/davinci_voicecodec.c |   12 +-----------
 1 files changed, 1 insertions(+), 11 deletions(-)
drivers/mfd/davinci_voicecodec.c +1 -11
index c0bcc87..c60ab0c 100644
@@ -177,17 +177,7 @@ static struct platform_driver davinci_vc_driver = {
 	.remove	= davinci_vc_remove,
 };
 
-static int __init davinci_vc_init(void)
-{
-	return platform_driver_probe(&davinci_vc_driver, davinci_vc_probe);
-}
-module_init(davinci_vc_init);
-
-static void __exit davinci_vc_exit(void)
-{
-	platform_driver_unregister(&davinci_vc_driver);
-}
-module_exit(davinci_vc_exit);
+module_platform_driver_probe(davinci_vc_driver, davinci_vc_probe);
 
 MODULE_AUTHOR("Miguel Aguilar");
 MODULE_DESCRIPTION("Texas Instruments DaVinci Voice Codec Core Interface");
Signature · 1 line
1.7.2.5
#4 lore raw
In reply to Jingoo Han

Hi Jingoo,

Quoted 7 lines · Jingoo Han

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

---
 drivers/mfd/ab3100-otp.c |   14 +-------------
 1 files changed, 1 insertions(+), 13 deletions(-)

All 3 patches applied, thanks.

Cheers,
Samuel.

Signature · 2 lines
Intel Open Source Technology Centre
http://oss.intel.com/