[<prev] [next>] [day] [month] [year] [list]
Message-Id: <1341902790-22631-1-git-send-email-devendra.aaru@gmail.com>
Date: Tue, 10 Jul 2012 12:16:30 +0530
From: Devendra Naga <devendra.aaru@...il.com>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Peter Huewe <peterhuewe@....de>, devel@...verdev.osuosl.org,
linux-kernel@...r.kernel.org
Cc: Devendra Naga <devendra.aaru@...il.com>
Subject: [PATCH 6/6] staging/phison: use module_pci_driver macro
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@...il.com>
---
drivers/staging/phison/phison.c | 13 +------------
1 file changed, 1 insertion(+), 12 deletions(-)
diff --git a/drivers/staging/phison/phison.c b/drivers/staging/phison/phison.c
index d77b21f..919cb95 100644
--- a/drivers/staging/phison/phison.c
+++ b/drivers/staging/phison/phison.c
@@ -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");
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists