From: Wei Yongjun Date: Tue, 9 Dec 2014 01:08:05 +0000 (+0800) Subject: mmc: toshsd: use module_pci_driver to simplify the code X-Git-Tag: v4.0-rc1~124^2~94 X-Git-Url: http://git.cascardo.eti.br/?a=commitdiff_plain;h=1818681cda4a1cd23a6c7582db2874b680fac6d4;p=cascardo%2Flinux.git mmc: toshsd: 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 Signed-off-by: Ulf Hansson --- diff --git a/drivers/mmc/host/toshsd.c b/drivers/mmc/host/toshsd.c index 4666262edaca..e5d8dec65f44 100644 --- a/drivers/mmc/host/toshsd.c +++ b/drivers/mmc/host/toshsd.c @@ -699,18 +699,7 @@ static struct pci_driver toshsd_driver = { .driver.pm = &toshsd_pm_ops, }; -static int __init toshsd_drv_init(void) -{ - return pci_register_driver(&toshsd_driver); -} - -static void __exit toshsd_drv_exit(void) -{ - pci_unregister_driver(&toshsd_driver); -} - -module_init(toshsd_drv_init); -module_exit(toshsd_drv_exit); +module_pci_driver(toshsd_driver); MODULE_AUTHOR("Ondrej Zary, Richard Betts"); MODULE_DESCRIPTION("Toshiba PCI Secure Digital Host Controller Interface driver");