public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
From: Wei Yongjun <weiyj.lk@gmail.com>
To: Jan Glauber <jglauber@cavium.com>,
	David Daney <david.daney@cavium.com>,
	"Steven J. Hill" <Steven.Hill@cavium.com>,
	Ulf Hansson <ulf.hansson@linaro.org>
Cc: Wei Yongjun <weiyongjun1@huawei.com>, linux-mmc@vger.kernel.org
Subject: [PATCH -next] mmc: cavium: Use module_pci_driver to simplify the code
Date: Tue, 25 Apr 2017 03:14:09 +0000	[thread overview]
Message-ID: <20170425031409.9822-1-weiyj.lk@gmail.com> (raw)

From: Wei Yongjun <weiyongjun1@huawei.com>

Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
---
 drivers/mmc/host/cavium-thunderx.c | 13 +------------
 1 file changed, 1 insertion(+), 12 deletions(-)

diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c
index 65244e8..fe3d772 100644
--- a/drivers/mmc/host/cavium-thunderx.c
+++ b/drivers/mmc/host/cavium-thunderx.c
@@ -179,18 +179,7 @@ static struct pci_driver thunder_mmc_driver = {
 	.remove = thunder_mmc_remove,
 };
 
-static int __init thunder_mmc_init_module(void)
-{
-	return pci_register_driver(&thunder_mmc_driver);
-}
-
-static void __exit thunder_mmc_exit_module(void)
-{
-	pci_unregister_driver(&thunder_mmc_driver);
-}
-
-module_init(thunder_mmc_init_module);
-module_exit(thunder_mmc_exit_module);
+module_pci_driver(thunder_mmc_driver);
 
 MODULE_AUTHOR("Cavium Inc.");
 MODULE_DESCRIPTION("Cavium ThunderX eMMC Driver");




             reply	other threads:[~2017-04-25  3:14 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-25  3:14 Wei Yongjun [this message]
2017-04-25  6:02 ` [PATCH -next] mmc: cavium: Use module_pci_driver to simplify the code Jan Glauber
2017-04-25  7:57 ` 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=20170425031409.9822-1-weiyj.lk@gmail.com \
    --to=weiyj.lk@gmail.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 \
    --cc=weiyongjun1@huawei.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