linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Sachin Kamat <sachin.kamat@linaro.org>
To: linux-input@vger.kernel.org
Cc: dmitry.torokhov@gmail.com, sachin.kamat@linaro.org
Subject: [PATCH 7/8] Input: q40kbd: Use module_platform_driver_probe macro
Date: Tue,  5 Mar 2013 08:53:46 +0530	[thread overview]
Message-ID: <1362453827-18129-7-git-send-email-sachin.kamat@linaro.org> (raw)
In-Reply-To: <1362453827-18129-1-git-send-email-sachin.kamat@linaro.org>

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


  parent reply	other threads:[~2013-03-05  3:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Sachin Kamat [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1362453827-18129-7-git-send-email-sachin.kamat@linaro.org \
    --to=sachin.kamat@linaro.org \
    --cc=dmitry.torokhov@gmail.com \
    --cc=linux-input@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).