From 2fc75da0c59634b81223af497c4a037822f6e457 Mon Sep 17 00:00:00 2001 From: Axel Lin Date: Thu, 19 Apr 2012 13:43:05 +0800 Subject: ata: use module_pci_driver This patch converts the drivers in drivers/ata/* to use module_pci_driver() macro which makes the code smaller and a bit simpler. Signed-off-by: Axel Lin Cc: Alan Cox Cc: Jeff Garzik Cc: Mikael Pettersson Cc: Mark Lord Cc: Jeremy Higdon Cc: Benjamin Herrenschmidt Signed-off-by: Jeff Garzik --- drivers/ata/sata_inic162x.c | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'drivers/ata/sata_inic162x.c') diff --git a/drivers/ata/sata_inic162x.c b/drivers/ata/sata_inic162x.c index 5c7d70c03bf0..dc35f4d42b8b 100644 --- a/drivers/ata/sata_inic162x.c +++ b/drivers/ata/sata_inic162x.c @@ -894,21 +894,10 @@ static struct pci_driver inic_pci_driver = { .remove = ata_pci_remove_one, }; -static int __init inic_init(void) -{ - return pci_register_driver(&inic_pci_driver); -} - -static void __exit inic_exit(void) -{ - pci_unregister_driver(&inic_pci_driver); -} +module_pci_driver(inic_pci_driver); MODULE_AUTHOR("Tejun Heo"); MODULE_DESCRIPTION("low-level driver for Initio 162x SATA"); MODULE_LICENSE("GPL v2"); MODULE_DEVICE_TABLE(pci, inic_pci_tbl); MODULE_VERSION(DRV_VERSION); - -module_init(inic_init); -module_exit(inic_exit); -- cgit v1.2.3