]> git.karo-electronics.de Git - linux-beck.git/commitdiff
staging/phison: use module_pci_driver macro
authorDevendra Naga <devendra.aaru@gmail.com>
Tue, 10 Jul 2012 06:46:30 +0000 (12:16 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 12 Jul 2012 00:26:02 +0000 (17:26 -0700)
remove the duplication of module_pci_driver and use this macro instead

module_pci_driver macro does the same things as the code below does

static int __init pci_test_dev_init(void)
{
       return pci_register_driver(&pci_test_driver_ops);
}

static void __exit pci_test_dev_exit(void)
{
       pci_unregister_driver(&pci_test_driver_ops);
}

module_init(pci_test_dev_init);
module_exit(pci_test_dev_exit);

Signed-off-by: Devendra Naga <devendra.aaru@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/phison/phison.c

index d77b21f1eb2d08dd1494aa3a4a9b5f6b9ede3ed0..919cb95236fc5f84a3533b7037d22d5b19ca6fc2 100644 (file)
@@ -87,18 +87,7 @@ static struct pci_driver phison_pci_driver = {
 #endif
 };
 
-static int __init phison_ide_init(void)
-{
-       return pci_register_driver(&phison_pci_driver);
-}
-
-static void __exit phison_ide_exit(void)
-{
-       pci_unregister_driver(&phison_pci_driver);
-}
-
-module_init(phison_ide_init);
-module_exit(phison_ide_exit);
+module_pci_driver(phison_pci_driver);
 
 MODULE_AUTHOR("Evan Ko");
 MODULE_DESCRIPTION("PCIE driver module for PHISON PS5000 E-BOX");