From: Axel Lin <axel.lin@ingics.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: Jan Glauber <jglauber@cavium.com>,
David Daney <david.daney@cavium.com>,
"Steven J. Hill" <Steven.Hill@cavium.com>,
linux-mmc@vger.kernel.org, Axel Lin <axel.lin@ingics.com>
Subject: [PATCH] mmc: cavium-octeon: Convert to use module_platform_driver
Date: Sat, 19 Aug 2017 21:06:11 +0800 [thread overview]
Message-ID: <20170819130611.3335-1-axel.lin@ingics.com> (raw)
Get rid of boilerplate code by using module_platform_driver macro.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/mmc/host/cavium-octeon.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/mmc/host/cavium-octeon.c b/drivers/mmc/host/cavium-octeon.c
index 951d2cd..22aded1 100644
--- a/drivers/mmc/host/cavium-octeon.c
+++ b/drivers/mmc/host/cavium-octeon.c
@@ -342,18 +342,7 @@ static struct platform_driver octeon_mmc_driver = {
},
};
-static int __init octeon_mmc_init(void)
-{
- return platform_driver_register(&octeon_mmc_driver);
-}
-
-static void __exit octeon_mmc_cleanup(void)
-{
- platform_driver_unregister(&octeon_mmc_driver);
-}
-
-module_init(octeon_mmc_init);
-module_exit(octeon_mmc_cleanup);
+module_platform_driver(octeon_mmc_driver);
MODULE_AUTHOR("Cavium Inc. <support@cavium.com>");
MODULE_DESCRIPTION("Low-level driver for Cavium OCTEON MMC/SSD card");
--
2.9.3
next reply other threads:[~2017-08-19 13:06 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-19 13:06 Axel Lin [this message]
2017-08-21 10:36 ` [PATCH] mmc: cavium-octeon: Convert to use module_platform_driver Jan Glauber
2017-08-22 11:15 ` Ulf Hansson
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=20170819130611.3335-1-axel.lin@ingics.com \
--to=axel.lin@ingics.com \
--cc=Steven.Hill@cavium.com \
--cc=david.daney@cavium.com \
--cc=jglauber@cavium.com \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.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