linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [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

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).