mmc: toshsd: use module_pci_driver to simplify the code
authorWei Yongjun <yongjun_wei@trendmicro.com.cn>
Tue, 9 Dec 2014 01:08:05 +0000 (09:08 +0800)
committerUlf Hansson <ulf.hansson@linaro.org>
Mon, 19 Jan 2015 08:56:07 +0000 (09:56 +0100)
Use the module_pci_driver() macro to make the code simpler
by eliminating module_init and module_exit calls.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/toshsd.c

index 4666262edacaee792591bc801c0f34a50f2cc0d8..e5d8dec65f4422645567d3e5fa9d1ea0db01e926 100644 (file)
@@ -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");