* [PATCH 1/8] Input: davinci_keyscan: Use module_platform_driver_probe macro
@ 2013-03-05 3:23 Sachin Kamat
2013-03-05 3:23 ` [PATCH 2/8] Input: twl4030-pwrbutton: " Sachin Kamat
` (6 more replies)
0 siblings, 7 replies; 12+ messages in thread
From: Sachin Kamat @ 2013-03-05 3:23 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
module_platform_driver_probe() simplifies the code by eliminating
boilerplate code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/keyboard/davinci_keyscan.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/drivers/input/keyboard/davinci_keyscan.c b/drivers/input/keyboard/davinci_keyscan.c
index 4e4e453..8297537 100644
--- a/drivers/input/keyboard/davinci_keyscan.c
+++ b/drivers/input/keyboard/davinci_keyscan.c
@@ -329,17 +329,7 @@ static struct platform_driver davinci_ks_driver = {
.remove = davinci_ks_remove,
};
-static int __init davinci_ks_init(void)
-{
- return platform_driver_probe(&davinci_ks_driver, davinci_ks_probe);
-}
-module_init(davinci_ks_init);
-
-static void __exit davinci_ks_exit(void)
-{
- platform_driver_unregister(&davinci_ks_driver);
-}
-module_exit(davinci_ks_exit);
+module_platform_driver_probe(davinci_ks_driver, davinci_ks_probe);
MODULE_AUTHOR("Miguel Aguilar");
MODULE_DESCRIPTION("Texas Instruments DaVinci Key Scan Driver");
--
1.7.4.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/8] Input: twl4030-pwrbutton: module_platform_driver_probe macro
2013-03-05 3:23 [PATCH 1/8] Input: davinci_keyscan: Use module_platform_driver_probe macro Sachin Kamat
@ 2013-03-05 3:23 ` Sachin Kamat
2013-03-05 3:23 ` [PATCH 3/8] Input: amikbd: Use " Sachin Kamat
` (5 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Sachin Kamat @ 2013-03-05 3:23 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/misc/twl4030-pwrbutton.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/drivers/input/misc/twl4030-pwrbutton.c b/drivers/input/misc/twl4030-pwrbutton.c
index 27c2bc8..b9a05fd 100644
--- a/drivers/input/misc/twl4030-pwrbutton.c
+++ b/drivers/input/misc/twl4030-pwrbutton.c
@@ -114,18 +114,8 @@ static struct platform_driver twl4030_pwrbutton_driver = {
},
};
-static int __init twl4030_pwrbutton_init(void)
-{
- return platform_driver_probe(&twl4030_pwrbutton_driver,
+module_platform_driver_probe(twl4030_pwrbutton_driver,
twl4030_pwrbutton_probe);
-}
-module_init(twl4030_pwrbutton_init);
-
-static void __exit twl4030_pwrbutton_exit(void)
-{
- platform_driver_unregister(&twl4030_pwrbutton_driver);
-}
-module_exit(twl4030_pwrbutton_exit);
MODULE_ALIAS("platform:twl4030_pwrbutton");
MODULE_DESCRIPTION("Triton2 Power Button");
--
1.7.4.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/8] Input: amikbd: Use module_platform_driver_probe macro
2013-03-05 3:23 [PATCH 1/8] Input: davinci_keyscan: Use module_platform_driver_probe macro Sachin Kamat
2013-03-05 3:23 ` [PATCH 2/8] Input: twl4030-pwrbutton: " Sachin Kamat
@ 2013-03-05 3:23 ` Sachin Kamat
2013-03-05 3:23 ` [PATCH 4/8] Input: nomadik-ske-keypad: " Sachin Kamat
` (4 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Sachin Kamat @ 2013-03-05 3:23 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/keyboard/amikbd.c | 14 +-------------
1 files changed, 1 insertions(+), 13 deletions(-)
diff --git a/drivers/input/keyboard/amikbd.c b/drivers/input/keyboard/amikbd.c
index 79172af..ba0b36f 100644
--- a/drivers/input/keyboard/amikbd.c
+++ b/drivers/input/keyboard/amikbd.c
@@ -260,18 +260,6 @@ static struct platform_driver amikbd_driver = {
},
};
-static int __init amikbd_init(void)
-{
- return platform_driver_probe(&amikbd_driver, amikbd_probe);
-}
-
-module_init(amikbd_init);
-
-static void __exit amikbd_exit(void)
-{
- platform_driver_unregister(&amikbd_driver);
-}
-
-module_exit(amikbd_exit);
+module_platform_driver_probe(amikbd_driver, amikbd_probe);
MODULE_ALIAS("platform:amiga-keyboard");
--
1.7.4.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 4/8] Input: nomadik-ske-keypad: Use module_platform_driver_probe macro
2013-03-05 3:23 [PATCH 1/8] Input: davinci_keyscan: Use module_platform_driver_probe macro Sachin Kamat
2013-03-05 3:23 ` [PATCH 2/8] Input: twl4030-pwrbutton: " Sachin Kamat
2013-03-05 3:23 ` [PATCH 3/8] Input: amikbd: Use " Sachin Kamat
@ 2013-03-05 3:23 ` Sachin Kamat
2013-03-07 4:16 ` Linus Walleij
2013-03-05 3:23 ` [PATCH 5/8] Input: amimouse: " Sachin Kamat
` (3 subsequent siblings)
6 siblings, 1 reply; 12+ messages in thread
From: Sachin Kamat @ 2013-03-05 3:23 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/keyboard/nomadik-ske-keypad.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c
index 0e6a815..c7d505c 100644
--- a/drivers/input/keyboard/nomadik-ske-keypad.c
+++ b/drivers/input/keyboard/nomadik-ske-keypad.c
@@ -430,17 +430,7 @@ static struct platform_driver ske_keypad_driver = {
.remove = ske_keypad_remove,
};
-static int __init ske_keypad_init(void)
-{
- return platform_driver_probe(&ske_keypad_driver, ske_keypad_probe);
-}
-module_init(ske_keypad_init);
-
-static void __exit ske_keypad_exit(void)
-{
- platform_driver_unregister(&ske_keypad_driver);
-}
-module_exit(ske_keypad_exit);
+module_platform_driver_probe(ske_keypad_driver, ske_keypad_probe);
MODULE_LICENSE("GPL v2");
MODULE_AUTHOR("Naveen Kumar <naveen.gaddipati@stericsson.com> / Sundar Iyer <sundar.iyer@stericsson.com>");
--
1.7.4.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 5/8] Input: amimouse: Use module_platform_driver_probe macro
2013-03-05 3:23 [PATCH 1/8] Input: davinci_keyscan: Use module_platform_driver_probe macro Sachin Kamat
` (2 preceding siblings ...)
2013-03-05 3:23 ` [PATCH 4/8] Input: nomadik-ske-keypad: " Sachin Kamat
@ 2013-03-05 3:23 ` Sachin Kamat
2013-03-05 3:23 ` [PATCH 6/8] Input: at32psif: " Sachin Kamat
` (2 subsequent siblings)
6 siblings, 0 replies; 12+ messages in thread
From: Sachin Kamat @ 2013-03-05 3:23 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/mouse/amimouse.c | 14 +-------------
1 files changed, 1 insertions(+), 13 deletions(-)
diff --git a/drivers/input/mouse/amimouse.c b/drivers/input/mouse/amimouse.c
index 5fa9934..b55d5af 100644
--- a/drivers/input/mouse/amimouse.c
+++ b/drivers/input/mouse/amimouse.c
@@ -146,18 +146,6 @@ static struct platform_driver amimouse_driver = {
},
};
-static int __init amimouse_init(void)
-{
- return platform_driver_probe(&amimouse_driver, amimouse_probe);
-}
-
-module_init(amimouse_init);
-
-static void __exit amimouse_exit(void)
-{
- platform_driver_unregister(&amimouse_driver);
-}
-
-module_exit(amimouse_exit);
+module_platform_driver_probe(amimouse_driver, amimouse_probe);
MODULE_ALIAS("platform:amiga-mouse");
--
1.7.4.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 6/8] Input: at32psif: Use module_platform_driver_probe macro
2013-03-05 3:23 [PATCH 1/8] Input: davinci_keyscan: Use module_platform_driver_probe macro Sachin Kamat
` (3 preceding siblings ...)
2013-03-05 3:23 ` [PATCH 5/8] Input: amimouse: " Sachin Kamat
@ 2013-03-05 3:23 ` Sachin Kamat
2013-03-05 3:23 ` [PATCH 7/8] Input: q40kbd: " Sachin Kamat
2013-03-05 3:23 ` [PATCH 8/8] Input: atmel-wm97xx: " Sachin Kamat
6 siblings, 0 replies; 12+ messages in thread
From: Sachin Kamat @ 2013-03-05 3:23 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/serio/at32psif.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/drivers/input/serio/at32psif.c b/drivers/input/serio/at32psif.c
index 36e799c..190ce35 100644
--- a/drivers/input/serio/at32psif.c
+++ b/drivers/input/serio/at32psif.c
@@ -359,18 +359,7 @@ static struct platform_driver psif_driver = {
},
};
-static int __init psif_init(void)
-{
- return platform_driver_probe(&psif_driver, psif_probe);
-}
-
-static void __exit psif_exit(void)
-{
- platform_driver_unregister(&psif_driver);
-}
-
-module_init(psif_init);
-module_exit(psif_exit);
+module_platform_driver_probe(psif_driver, psif_probe);
MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
MODULE_DESCRIPTION("Atmel AVR32 PSIF PS/2 driver");
--
1.7.4.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 7/8] Input: q40kbd: Use module_platform_driver_probe macro
2013-03-05 3:23 [PATCH 1/8] Input: davinci_keyscan: Use module_platform_driver_probe macro Sachin Kamat
` (4 preceding siblings ...)
2013-03-05 3:23 ` [PATCH 6/8] Input: at32psif: " Sachin Kamat
@ 2013-03-05 3:23 ` Sachin Kamat
2013-03-05 3:23 ` [PATCH 8/8] Input: atmel-wm97xx: " Sachin Kamat
6 siblings, 0 replies; 12+ messages in thread
From: Sachin Kamat @ 2013-03-05 3:23 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
---
drivers/input/serio/q40kbd.c | 13 +------------
1 files changed, 1 insertions(+), 12 deletions(-)
diff --git a/drivers/input/serio/q40kbd.c b/drivers/input/serio/q40kbd.c
index 70fe542..436a343 100644
--- a/drivers/input/serio/q40kbd.c
+++ b/drivers/input/serio/q40kbd.c
@@ -193,15 +193,4 @@ static struct platform_driver q40kbd_driver = {
.remove = q40kbd_remove,
};
-static int __init q40kbd_init(void)
-{
- return platform_driver_probe(&q40kbd_driver, q40kbd_probe);
-}
-
-static void __exit q40kbd_exit(void)
-{
- platform_driver_unregister(&q40kbd_driver);
-}
-
-module_init(q40kbd_init);
-module_exit(q40kbd_exit);
+module_platform_driver_probe(q40kbd_driver, q40kbd_probe);
--
1.7.4.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 8/8] Input: atmel-wm97xx: Use module_platform_driver_probe macro
2013-03-05 3:23 [PATCH 1/8] Input: davinci_keyscan: Use module_platform_driver_probe macro Sachin Kamat
` (5 preceding siblings ...)
2013-03-05 3:23 ` [PATCH 7/8] Input: q40kbd: " Sachin Kamat
@ 2013-03-05 3:23 ` Sachin Kamat
2013-03-05 3:36 ` Mark Brown
6 siblings, 1 reply; 12+ messages in thread
From: Sachin Kamat @ 2013-03-05 3:23 UTC (permalink / raw)
To: linux-input; +Cc: dmitry.torokhov, sachin.kamat, Mark Brown
module_platform_driver_probe() eliminates the boilerplate and simplifies
the code.
Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com>
---
drivers/input/touchscreen/atmel-wm97xx.c | 12 +-----------
1 files changed, 1 insertions(+), 11 deletions(-)
diff --git a/drivers/input/touchscreen/atmel-wm97xx.c b/drivers/input/touchscreen/atmel-wm97xx.c
index c5c2dbb..2c1e46b 100644
--- a/drivers/input/touchscreen/atmel-wm97xx.c
+++ b/drivers/input/touchscreen/atmel-wm97xx.c
@@ -432,17 +432,7 @@ static struct platform_driver atmel_wm97xx_driver = {
},
};
-static int __init atmel_wm97xx_init(void)
-{
- return platform_driver_probe(&atmel_wm97xx_driver, atmel_wm97xx_probe);
-}
-module_init(atmel_wm97xx_init);
-
-static void __exit atmel_wm97xx_exit(void)
-{
- platform_driver_unregister(&atmel_wm97xx_driver);
-}
-module_exit(atmel_wm97xx_exit);
+module_platform_driver_probe(atmel_wm97xx_driver, atmel_wm97xx_probe);
MODULE_AUTHOR("Hans-Christian Egtvedt <egtvedt@samfundet.no>");
MODULE_DESCRIPTION("wm97xx continuous touch driver for Atmel AT91 and AVR32");
--
1.7.4.1
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 8/8] Input: atmel-wm97xx: Use module_platform_driver_probe macro
2013-03-05 3:23 ` [PATCH 8/8] Input: atmel-wm97xx: " Sachin Kamat
@ 2013-03-05 3:36 ` Mark Brown
2013-03-05 3:47 ` Sachin Kamat
0 siblings, 1 reply; 12+ messages in thread
From: Mark Brown @ 2013-03-05 3:36 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-input, dmitry.torokhov
[-- Attachment #1: Type: text/plain, Size: 325 bytes --]
On Tue, Mar 05, 2013 at 08:53:47AM +0530, Sachin Kamat wrote:
> module_platform_driver_probe() eliminates the boilerplate and simplifies
> the code.
Is there really any great reason to use this as opposed to
module_platform_driver()? I know the existing code does this, it's not
clear to me that that's a good idea either.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 8/8] Input: atmel-wm97xx: Use module_platform_driver_probe macro
2013-03-05 3:36 ` Mark Brown
@ 2013-03-05 3:47 ` Sachin Kamat
2013-03-05 3:51 ` Mark Brown
0 siblings, 1 reply; 12+ messages in thread
From: Sachin Kamat @ 2013-03-05 3:47 UTC (permalink / raw)
To: Mark Brown; +Cc: linux-input, dmitry.torokhov
On 5 March 2013 09:06, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> On Tue, Mar 05, 2013 at 08:53:47AM +0530, Sachin Kamat wrote:
>> module_platform_driver_probe() eliminates the boilerplate and simplifies
>> the code.
>
> Is there really any great reason to use this as opposed to
> module_platform_driver()?
Since the init function returns platform_driver_probe() instead of
platform_driver_register(), I have used module_platform_driver_probe()
macro.
>I know the existing code does this, it's not
> clear to me that that's a good idea either.
However, if your question is why return platform_driver_probe() at all
instead of platform_driver_register() in the first place, then I am
sorry I do not have much idea about it.
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 8/8] Input: atmel-wm97xx: Use module_platform_driver_probe macro
2013-03-05 3:47 ` Sachin Kamat
@ 2013-03-05 3:51 ` Mark Brown
0 siblings, 0 replies; 12+ messages in thread
From: Mark Brown @ 2013-03-05 3:51 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-input, dmitry.torokhov
[-- Attachment #1: Type: text/plain, Size: 484 bytes --]
On Tue, Mar 05, 2013 at 09:17:27AM +0530, Sachin Kamat wrote:
> On 5 March 2013 09:06, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> >I know the existing code does this, it's not
> > clear to me that that's a good idea either.
> However, if your question is why return platform_driver_probe() at all
> instead of platform_driver_register() in the first place, then I am
> sorry I do not have much idea about it.
Yes, I'm questioning if this is the right cleanup to do.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 4/8] Input: nomadik-ske-keypad: Use module_platform_driver_probe macro
2013-03-05 3:23 ` [PATCH 4/8] Input: nomadik-ske-keypad: " Sachin Kamat
@ 2013-03-07 4:16 ` Linus Walleij
0 siblings, 0 replies; 12+ messages in thread
From: Linus Walleij @ 2013-03-07 4:16 UTC (permalink / raw)
To: Sachin Kamat; +Cc: linux-input, dmitry.torokhov
On Tue, Mar 5, 2013 at 4:23 AM, Sachin Kamat <sachin.kamat@linaro.org> wrote:
> module_platform_driver_probe() eliminates the boilerplate and simplifies
> the code.
>
> Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Acked-by: Linus Walleij <linus.walleij@linaro.org>
Yours,
Linus Walleij
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2013-03-07 4:16 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-05 3:23 [PATCH 1/8] Input: davinci_keyscan: Use module_platform_driver_probe macro Sachin Kamat
2013-03-05 3:23 ` [PATCH 2/8] Input: twl4030-pwrbutton: " Sachin Kamat
2013-03-05 3:23 ` [PATCH 3/8] Input: amikbd: Use " Sachin Kamat
2013-03-05 3:23 ` [PATCH 4/8] Input: nomadik-ske-keypad: " Sachin Kamat
2013-03-07 4:16 ` Linus Walleij
2013-03-05 3:23 ` [PATCH 5/8] Input: amimouse: " Sachin Kamat
2013-03-05 3:23 ` [PATCH 6/8] Input: at32psif: " Sachin Kamat
2013-03-05 3:23 ` [PATCH 7/8] Input: q40kbd: " Sachin Kamat
2013-03-05 3:23 ` [PATCH 8/8] Input: atmel-wm97xx: " Sachin Kamat
2013-03-05 3:36 ` Mark Brown
2013-03-05 3:47 ` Sachin Kamat
2013-03-05 3:51 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).