public inbox for linux-mmc@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH -next] mmc: cavium: Use module_pci_driver to simplify the code
@ 2017-04-25  3:14 Wei Yongjun
  2017-04-25  6:02 ` Jan Glauber
  2017-04-25  7:57 ` Ulf Hansson
  0 siblings, 2 replies; 3+ messages in thread
From: Wei Yongjun @ 2017-04-25  3:14 UTC (permalink / raw)
  To: Jan Glauber, David Daney, Steven J. Hill, Ulf Hansson
  Cc: Wei Yongjun, linux-mmc

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");




^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-04-25  7:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-25  3:14 [PATCH -next] mmc: cavium: Use module_pci_driver to simplify the code Wei Yongjun
2017-04-25  6:02 ` Jan Glauber
2017-04-25  7:57 ` Ulf Hansson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox