mtd: denali_pci: use module_pci_driver() macro

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Sep 1 14:59:04 PDT 2015


Gitweb:     http://git.infradead.org/?p=mtd-2.6.git;a=commit;h=2445d33d852320d4ce700b2428d60991f8cf478f
Commit:     2445d33d852320d4ce700b2428d60991f8cf478f
Parent:     04868a67ed582e845bf14a5a7789f8bdb3faadd3
Author:     Andy Shevchenko <andriy.shevchenko at linux.intel.com>
AuthorDate: Thu Aug 6 16:04:22 2015 +0300
Committer:  Brian Norris <computersforpeace at gmail.com>
CommitDate: Tue Aug 18 17:21:36 2015 -0700

    mtd: denali_pci: use module_pci_driver() macro
    
    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 at linux.intel.com>
    Signed-off-by: Brian Norris <computersforpeace at gmail.com>
---
 drivers/mtd/nand/denali_pci.c | 12 +-----------
 1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/drivers/mtd/nand/denali_pci.c b/drivers/mtd/nand/denali_pci.c
index 6e2f387..29e5d0c 100644
--- a/drivers/mtd/nand/denali_pci.c
+++ b/drivers/mtd/nand/denali_pci.c
@@ -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);



More information about the linux-mtd-cvs mailing list