linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Slawomir Stepien <sst@poczta.fm>
To: dmitry.torokhov@gmail.com
Cc: ldewangan@nvidia.com, linux-input@vger.kernel.org,
	linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org
Subject: [PATCH] Input: gpio-keys - use module_platform_driver macro
Date: Thu, 27 Oct 2016 16:15:54 +0200	[thread overview]
Message-ID: <20161027141554.GA31977@x220.localdomain> (raw)

The gpio_keys_init() and gpio_keys_exit() are not doing anything
more then just register and unregister. Replace these functions with
module_platform_driver.

Signed-off-by: Slawomir Stepien <sst@poczta.fm>
---
 drivers/input/keyboard/gpio_keys.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c
index 2909365..e54b586 100644
--- a/drivers/input/keyboard/gpio_keys.c
+++ b/drivers/input/keyboard/gpio_keys.c
@@ -877,18 +877,7 @@ static struct platform_driver gpio_keys_device_driver = {
 	}
 };
 
-static int __init gpio_keys_init(void)
-{
-	return platform_driver_register(&gpio_keys_device_driver);
-}
-
-static void __exit gpio_keys_exit(void)
-{
-	platform_driver_unregister(&gpio_keys_device_driver);
-}
-
-late_initcall(gpio_keys_init);
-module_exit(gpio_keys_exit);
+module_platform_driver(gpio_keys_device_driver);
 
 MODULE_LICENSE("GPL");
 MODULE_AUTHOR("Phil Blundell <pb@handhelds.org>");
-- 
2.10.0

             reply	other threads:[~2016-10-27 14:31 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-27 14:15 Slawomir Stepien [this message]
2016-10-27 16:48 ` [PATCH] Input: gpio-keys - use module_platform_driver macro Dmitry Torokhov
2016-10-27 19:11   ` Slawomir Stepien

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=20161027141554.GA31977@x220.localdomain \
    --to=sst@poczta.fm \
    --cc=dmitry.torokhov@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@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).