Skip to content

Commit

Permalink
mmc: cavium: Use module_pci_driver to simplify the code
Browse files Browse the repository at this point in the history
Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Jan Glauber <[email protected]>
Signed-off-by: Ulf Hansson <[email protected]>
  • Loading branch information
Wei Yongjun authored and storulf committed Apr 25, 2017
1 parent 01d9584 commit dfc28b1
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/mmc/host/cavium-thunderx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit dfc28b1

Please sign in to comment.