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/ahci.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'drivers/ata/ahci.c') diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 20da1bcfebb9..4d9373e509cc 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c @@ -1249,22 +1249,10 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) &ahci_sht); } -static int __init ahci_init(void) -{ - return pci_register_driver(&ahci_pci_driver); -} - -static void __exit ahci_exit(void) -{ - pci_unregister_driver(&ahci_pci_driver); -} - +module_pci_driver(ahci_pci_driver); MODULE_AUTHOR("Jeff Garzik"); MODULE_DESCRIPTION("AHCI SATA low-level driver"); MODULE_LICENSE("GPL"); MODULE_DEVICE_TABLE(pci, ahci_pci_tbl); MODULE_VERSION(DRV_VERSION); - -module_init(ahci_init); -module_exit(ahci_exit); -- cgit v1.2.3-59-g8ed1b