2013-03-05 04:47:12

by Jingoo Han

[permalink] [raw]
Subject: [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.

Signed-off-by: Jingoo Han <[email protected]>
---
drivers/mfd/ab3100-otp.c | 14 +-------------
1 files changed, 1 insertions(+), 13 deletions(-)

diff --git a/drivers/mfd/ab3100-otp.c b/drivers/mfd/ab3100-otp.c
index 8440010..d7ce016 100644
--- a/drivers/mfd/ab3100-otp.c
+++ b/drivers/mfd/ab3100-otp.c
@@ -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");
--
1.7.2.5


2013-03-05 04:48:03

by Jingoo Han

[permalink] [raw]
Subject: [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.

Signed-off-by: Jingoo Han <[email protected]>
---
drivers/mfd/htc-pasic3.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)

diff --git a/drivers/mfd/htc-pasic3.c b/drivers/mfd/htc-pasic3.c
index 9e5453d..0285fce 100644
--- a/drivers/mfd/htc-pasic3.c
+++ b/drivers/mfd/htc-pasic3.c
@@ -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");
--
1.7.2.5

2013-03-05 04:48:31

by Jingoo Han

[permalink] [raw]
Subject: [PATCH 3/3] mfd: davinci_voicecodec: 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 <[email protected]>
---
drivers/mfd/davinci_voicecodec.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)

diff --git a/drivers/mfd/davinci_voicecodec.c b/drivers/mfd/davinci_voicecodec.c
index c0bcc87..c60ab0c 100644
--- a/drivers/mfd/davinci_voicecodec.c
+++ b/drivers/mfd/davinci_voicecodec.c
@@ -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");
--
1.7.2.5

2013-03-07 04:14:56

by Linus Walleij

[permalink] [raw]
Subject: Re: [PATCH 1/3] mfd: ab3100-otp: use module_platform_driver_probe()

On Tue, Mar 5, 2013 at 5:47 AM, Jingoo Han <[email protected]> wrote:

> This patch uses module_platform_driver_probe() macro which makes
> the code smaller and simpler.
>
> Signed-off-by: Jingoo Han <[email protected]>

Acked-by: Linus Walleij <[email protected]>

Yours,
Linus Walleij

2013-04-05 16:09:40

by Samuel Ortiz

[permalink] [raw]
Subject: Re: [PATCH 1/3] mfd: ab3100-otp: use module_platform_driver_probe()

Hi Jingoo,

On Tue, Mar 05, 2013 at 01:47:06PM +0900, Jingoo Han wrote:
> This patch uses module_platform_driver_probe() macro which makes
> the code smaller and simpler.
>
> Signed-off-by: Jingoo Han <[email protected]>
> ---
> drivers/mfd/ab3100-otp.c | 14 +-------------
> 1 files changed, 1 insertions(+), 13 deletions(-)
All 3 patches applied, thanks.

Cheers,
Samuel.

--
Intel Open Source Technology Centre
http://oss.intel.com/