mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jan Luebbe <jlu@pengutronix.de>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: Rodolfo Giometti <giometti@enneenne.com>,
	linux-kernel@vger.kernel.org, Jan Luebbe <jlu@pengutronix.de>
Subject: [PATCH 2/2] pps-gpio: convert to module_platform_driver
Date: Fri, 26 Apr 2013 14:47:49 +0200	[thread overview]
Message-ID: <1366980469-6763-2-git-send-email-jlu@pengutronix.de> (raw)
In-Reply-To: <1366980469-6763-1-git-send-email-jlu@pengutronix.de>

This removes some boilerplate code (no functional changes).

Signed-off-by: Jan Luebbe <jlu@pengutronix.de>
Acked-by: Rodolfo Giometti <giometti@enneenne.com>
---
 drivers/pps/clients/pps-gpio.c |   18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/pps/clients/pps-gpio.c b/drivers/pps/clients/pps-gpio.c
index 221858d..6768f95 100644
--- a/drivers/pps/clients/pps-gpio.c
+++ b/drivers/pps/clients/pps-gpio.c
@@ -188,23 +188,7 @@ static struct platform_driver pps_gpio_driver = {
 	},
 };
 
-static int __init pps_gpio_init(void)
-{
-	int ret = platform_driver_register(&pps_gpio_driver);
-	if (ret < 0)
-		pr_err("failed to register platform driver\n");
-	return ret;
-}
-
-static void __exit pps_gpio_exit(void)
-{
-	platform_driver_unregister(&pps_gpio_driver);
-	pr_debug("unregistered platform driver\n");
-}
-
-module_init(pps_gpio_init);
-module_exit(pps_gpio_exit);
-
+module_platform_driver(pps_gpio_driver);
 MODULE_AUTHOR("Ricardo Martins <rasm@fe.up.pt>");
 MODULE_AUTHOR("James Nuss <jamesnuss@nanometrics.ca>");
 MODULE_DESCRIPTION("Use GPIO pin as PPS source");
-- 
1.7.10.4


      reply	other threads:[~2013-04-26 12:47 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-10  7:12 [PATCH 1/2] pps-gpio: convert to devm_* helpers Jan Luebbe
2013-04-10  7:12 ` [PATCH 2/2] pps-gpio: convert to module_platform_driver Jan Luebbe
2013-04-22  8:38 ` [PATCH 1/2] pps-gpio: convert to devm_* helpers Jan Lübbe
2013-04-22  8:47   ` Rodolfo Giometti
2013-04-23 13:20   ` Rodolfo Giometti
2013-04-26 12:47 ` Jan Luebbe
2013-04-26 12:47   ` Jan Luebbe [this message]

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=1366980469-6763-2-git-send-email-jlu@pengutronix.de \
    --to=jlu@pengutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=giometti@enneenne.com \
    --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

all inboxes | Powered by JetHome®