From fe2af11c220c7bb3a67f7aec0594811e5c59e019 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Tue, 3 Apr 2012 10:07:01 +0800 Subject: firewire: use module_pci_driver This patch converts the drivers in drivers/firewire/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin Signed-off-by: Stefan Richter --- drivers/firewire/ohci.c | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) (limited to 'drivers/firewire/ohci.c') diff --git a/drivers/firewire/ohci.c b/drivers/firewire/ohci.c index 2b5460075a9f..67c8d274473b 100644 --- a/drivers/firewire/ohci.c +++ b/drivers/firewire/ohci.c @@ -3789,6 +3789,8 @@ static struct pci_driver fw_ohci_pci_driver = { #endif }; +module_pci_driver(fw_ohci_pci_driver); + MODULE_AUTHOR("Kristian Hoegsberg "); MODULE_DESCRIPTION("Driver for PCI OHCI IEEE1394 controllers"); MODULE_LICENSE("GPL"); @@ -3797,16 +3799,3 @@ MODULE_LICENSE("GPL"); #ifndef CONFIG_IEEE1394_OHCI1394_MODULE MODULE_ALIAS("ohci1394"); #endif - -static int __init fw_ohci_init(void) -{ - return pci_register_driver(&fw_ohci_pci_driver); -} - -static void __exit fw_ohci_cleanup(void) -{ - pci_unregister_driver(&fw_ohci_pci_driver); -} - -module_init(fw_ohci_init); -module_exit(fw_ohci_cleanup); -- cgit v1.2.1