mtd: denali_pci: use module_pci_driver() macro
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Thu, 6 Aug 2015 13:04:22 +0000 (16:04 +0300)
committerBrian Norris <computersforpeace@gmail.com>
Wed, 19 Aug 2015 00:21:36 +0000 (17:21 -0700)
Let's use module_pci_driver() macro to reduce code base of the driver.

There is no functional change.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
drivers/mtd/nand/denali_pci.c

index 6e2f387b823f694e59e368bc987850a986c7d0c2..29e5d0c7d2d3fff138320ab218bd4138933d0dfa 100644 (file)
@@ -129,14 +129,4 @@ static struct pci_driver denali_pci_driver = {
        .remove = denali_pci_remove,
 };
 
-static int denali_init_pci(void)
-{
-       return pci_register_driver(&denali_pci_driver);
-}
-module_init(denali_init_pci);
-
-static void denali_exit_pci(void)
-{
-       pci_unregister_driver(&denali_pci_driver);
-}
-module_exit(denali_exit_pci);
+module_pci_driver(denali_pci_driver);