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 2/8] Input: twl4030-pwrbutton: module_platform_driver_probe macro
Date: Tue,  5 Mar 2013 08:53:41 +0530	[thread overview]
Message-ID: <1362453827-18129-2-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/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


  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 ` Sachin Kamat [this message]
2013-03-05  3:23 ` [PATCH 3/8] Input: amikbd: " 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

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