From: Fabio Porcedda <fabio.porcedda@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 05/10] drivers: ide: use module_platform_driver_probe()
Date: Thu, 14 Mar 2013 13:11:26 +0000 [thread overview]
Message-ID: <1363266691-15757-7-git-send-email-fabio.porcedda@gmail.com> (raw)
In-Reply-To: <1363266691-15757-1-git-send-email-fabio.porcedda@gmail.com>
This patch converts the drivers to use the
module_platform_driver_probe() macro which makes the code smaller and
a bit simpler.
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: linux-ide@vger.kernel.org
---
drivers/ide/gayle.c | 15 +--------------
drivers/ide/tx4938ide.c | 13 +------------
drivers/ide/tx4939ide.c | 13 +------------
3 files changed, 3 insertions(+), 38 deletions(-)
diff --git a/drivers/ide/gayle.c b/drivers/ide/gayle.c
index 51beb85..0a8440a 100644
--- a/drivers/ide/gayle.c
+++ b/drivers/ide/gayle.c
@@ -183,20 +183,7 @@ static struct platform_driver amiga_gayle_ide_driver = {
},
};
-static int __init amiga_gayle_ide_init(void)
-{
- return platform_driver_probe(&amiga_gayle_ide_driver,
- amiga_gayle_ide_probe);
-}
-
-module_init(amiga_gayle_ide_init);
-
-static void __exit amiga_gayle_ide_exit(void)
-{
- platform_driver_unregister(&amiga_gayle_ide_driver);
-}
-
-module_exit(amiga_gayle_ide_exit);
+module_platform_driver_probe(amiga_gayle_ide_driver, amiga_gayle_ide_probe);
MODULE_LICENSE("GPL");
MODULE_ALIAS("platform:amiga-gayle-ide");
diff --git a/drivers/ide/tx4938ide.c b/drivers/ide/tx4938ide.c
index 91d49dd..ede8575 100644
--- a/drivers/ide/tx4938ide.c
+++ b/drivers/ide/tx4938ide.c
@@ -203,18 +203,7 @@ static struct platform_driver tx4938ide_driver = {
.remove = __exit_p(tx4938ide_remove),
};
-static int __init tx4938ide_init(void)
-{
- return platform_driver_probe(&tx4938ide_driver, tx4938ide_probe);
-}
-
-static void __exit tx4938ide_exit(void)
-{
- platform_driver_unregister(&tx4938ide_driver);
-}
-
-module_init(tx4938ide_init);
-module_exit(tx4938ide_exit);
+module_platform_driver_probe(tx4938ide_driver, tx4938ide_probe);
MODULE_DESCRIPTION("TX4938 internal IDE driver");
MODULE_LICENSE("GPL");
diff --git a/drivers/ide/tx4939ide.c b/drivers/ide/tx4939ide.c
index c0ab800..4ecdee5 100644
--- a/drivers/ide/tx4939ide.c
+++ b/drivers/ide/tx4939ide.c
@@ -624,18 +624,7 @@ static struct platform_driver tx4939ide_driver = {
.resume = tx4939ide_resume,
};
-static int __init tx4939ide_init(void)
-{
- return platform_driver_probe(&tx4939ide_driver, tx4939ide_probe);
-}
-
-static void __exit tx4939ide_exit(void)
-{
- platform_driver_unregister(&tx4939ide_driver);
-}
-
-module_init(tx4939ide_init);
-module_exit(tx4939ide_exit);
+module_platform_driver_probe(tx4939ide_driver, tx4939ide_probe);
MODULE_DESCRIPTION("TX4939 internal IDE driver");
MODULE_LICENSE("GPL");
--
1.8.1.5
next prev parent reply other threads:[~2013-03-14 13:11 UTC|newest]
Thread overview: 39+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-14 13:11 [PATCH 00/10] Use module_platform_driver_probe() part 2 Fabio Porcedda
2013-03-14 13:11 ` [PATCH 01/10] drivers: media: use module_platform_driver_probe() Fabio Porcedda
2013-03-14 13:25 ` Guennadi Liakhovetski
2013-03-14 16:40 ` Fabio Porcedda
2013-03-14 13:11 ` [PATCH] drivers: misc: " Fabio Porcedda
2013-03-14 13:11 ` [PATCH 02/10] drivers: ata: " Fabio Porcedda
2013-03-14 13:11 ` [PATCH 03/10] drivers: char: " Fabio Porcedda
2013-03-14 13:11 ` [PATCH 04/10] drivers: hwmon: " Fabio Porcedda
2013-03-14 14:01 ` Guenter Roeck
2013-03-14 16:42 ` Fabio Porcedda
2013-03-14 13:11 ` Fabio Porcedda [this message]
2013-03-14 13:11 ` [PATCH 06/10] drivers: input: " Fabio Porcedda
2013-03-14 13:11 ` [PATCH 07/10] drivers: memory: " Fabio Porcedda
2013-03-14 13:11 ` [PATCH 08/10] drivers: mfd: " Fabio Porcedda
2013-04-09 8:06 ` Samuel Ortiz
2013-04-09 9:23 ` Fabio Porcedda
2013-03-14 13:11 ` [PATCH 09/10] drivers: video: " Fabio Porcedda
2013-03-14 13:11 ` [PATCH 10/10] drivers: misc: " Fabio Porcedda
2013-03-14 13:58 ` Arnd Bergmann
2013-03-14 14:06 ` Sascha Hauer
2013-03-15 11:18 ` Fabio Porcedda
2013-03-15 11:28 ` Arnd Bergmann
2013-03-15 18:09 ` Fabio Porcedda
2013-03-15 17:43 ` H Hartley Sweeten
2013-03-15 20:18 ` Arnd Bergmann
2013-03-18 10:03 ` Fabio Porcedda
2013-03-18 10:58 ` Arnd Bergmann
2013-03-18 11:20 ` Fabio Porcedda
2013-03-18 11:28 ` Arnd Bergmann
2013-03-19 8:55 ` Fabio Porcedda
2013-03-19 9:04 ` Geert Uytterhoeven
2013-03-19 16:48 ` Arnd Bergmann
2013-03-19 17:11 ` Fabio Porcedda
2013-03-19 17:59 ` Arnd Bergmann
2013-03-20 9:02 ` Fabio Porcedda
2013-03-20 10:20 ` Arnd Bergmann
2013-03-20 10:39 ` Fabio Porcedda
2013-03-20 11:46 ` Arnd Bergmann
2013-03-21 13:10 ` Fabio Porcedda
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=1363266691-15757-7-git-send-email-fabio.porcedda@gmail.com \
--to=fabio.porcedda@gmail.com \
--cc=linux-arm-kernel@lists.infradead.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).