mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Nicolas Ferre <nicolas.ferre@atmel.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: <linux-arm-kernel@lists.infradead.org>,
	<linux-kernel@vger.kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	<linux-pcmcia@lists.infradead.org>, <linux@dominikbrodowski.net>,
	<manabian@gmail.com>, <fabio.porcedda@gmail.com>,
	<laurent.navet@gmail.com>,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
	Nicolas Ferre <nicolas.ferre@atmel.com>
Subject: [PATCH v3 6/7] pcmcia: at91_cf: use module_platform_driver_probe()
Date: Thu, 6 Jun 2013 10:24:19 +0200	[thread overview]
Message-ID: <83a19de2ec83a4210b11b3ac49e3652d90e00a04.1370506678.git.nicolas.ferre@atmel.com> (raw)
In-Reply-To: <cover.1370506678.git.nicolas.ferre@atmel.com>

From: Fabio Porcedda <fabio.porcedda@gmail.com>

Use module_platform_driver_probe() macro which makes the code smaller
and simpler.

Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
---
 drivers/pcmcia/at91_cf.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c
index 149b95c..8ddc57c 100644
--- a/drivers/pcmcia/at91_cf.c
+++ b/drivers/pcmcia/at91_cf.c
@@ -411,17 +411,7 @@ static struct platform_driver at91_cf_driver = {
 
 /*--------------------------------------------------------------------------*/
 
-static int __init at91_cf_init(void)
-{
-	return platform_driver_probe(&at91_cf_driver, at91_cf_probe);
-}
-module_init(at91_cf_init);
-
-static void __exit at91_cf_exit(void)
-{
-	platform_driver_unregister(&at91_cf_driver);
-}
-module_exit(at91_cf_exit);
+module_platform_driver_probe(at91_cf_driver, at91_cf_probe);
 
 MODULE_DESCRIPTION("AT91 Compact Flash Driver");
 MODULE_AUTHOR("David Brownell");
-- 
1.8.2.2


  parent reply	other threads:[~2013-06-06  8:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-06  8:24 [PATCH v3 0/7] pcmcia: at91_cf: clean up and add DT support Nicolas Ferre
2013-06-06  8:24 ` [PATCH v3 1/7] pcmcia: at91_cf: fix gpio_get_value in at91_cf_get_status Nicolas Ferre
2013-06-06 16:15   ` Jean-Christophe PLAGNIOL-VILLARD
2013-06-06  8:24 ` [PATCH v3 2/7] pcmcia: at91_cf: convert to dev_ print functions Nicolas Ferre
2013-06-06  8:24 ` [PATCH v3 3/7] pcmcia: at91_cf: use devm_ functions for allocations Nicolas Ferre
2013-06-06  8:24 ` [PATCH v3 4/7] pcmcia: at91_cf: clean up header includes Nicolas Ferre
2013-06-06  8:24 ` [PATCH v3 5/7] pcmcia: at91_cf: add support for DT Nicolas Ferre
2013-06-06  8:24 ` Nicolas Ferre [this message]
2013-06-06  8:24 ` [PATCH v3 7/7] pcmcia/trivial: at91_cf: fix checkpatch error Nicolas Ferre
2013-06-06 16:14 ` [PATCH v3 0/7] pcmcia: at91_cf: clean up and add DT support Jean-Christophe PLAGNIOL-VILLARD

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=83a19de2ec83a4210b11b3ac49e3652d90e00a04.1370506678.git.nicolas.ferre@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=akpm@linux-foundation.org \
    --cc=fabio.porcedda@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=laurent.navet@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pcmcia@lists.infradead.org \
    --cc=linux@dominikbrodowski.net \
    --cc=manabian@gmail.com \
    --cc=plagnioj@jcrosoft.com \
    /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®