summaryrefslogtreecommitdiffstats
path: root/drivers/mmc/host/cavium-thunderx.c
diff options
context:
space:
mode:
authorWei Yongjun2017-04-25 05:14:09 +0200
committerUlf Hansson2017-04-25 08:12:05 +0200
commitdfc28b110d4f42953147204bc627b3c64205ed19 (patch)
tree75c76962fa6fd4db6fbf4029d492889e6c980fa0 /drivers/mmc/host/cavium-thunderx.c
parentmmc: cavium: Add MMC support for Octeon SOCs. (diff)
downloadkernel-qcow2-linux-dfc28b110d4f42953147204bc627b3c64205ed19.tar.gz
kernel-qcow2-linux-dfc28b110d4f42953147204bc627b3c64205ed19.tar.xz
kernel-qcow2-linux-dfc28b110d4f42953147204bc627b3c64205ed19.zip
mmc: cavium: Use module_pci_driver to simplify the code
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> Acked-by: Jan Glauber <jglauber@cavium.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc/host/cavium-thunderx.c')
-rw-r--r--drivers/mmc/host/cavium-thunderx.c13
1 files changed, 1 insertions, 12 deletions
diff --git a/drivers/mmc/host/cavium-thunderx.c b/drivers/mmc/host/cavium-thunderx.c
index 65244e8df5dd..fe3d77267cd6 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");