diff options
Diffstat (limited to 'drivers/ata/pata_sch.c')
| -rw-r--r-- | drivers/ata/pata_sch.c | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/drivers/ata/pata_sch.c b/drivers/ata/pata_sch.c index 99cceb458e2..b920c3407f8 100644 --- a/drivers/ata/pata_sch.c +++ b/drivers/ata/pata_sch.c @@ -27,7 +27,6 @@ #include <linux/kernel.h> #include <linux/module.h> #include <linux/pci.h> -#include <linux/init.h> #include <linux/blkdev.h> #include <linux/delay.h> #include <linux/device.h> @@ -65,7 +64,7 @@ static struct pci_driver sch_pci_driver = { .id_table = sch_pci_tbl, .probe = sch_init_one, .remove = ata_pci_remove_one, -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP .suspend = ata_pci_device_suspend, .resume = ata_pci_device_resume, #endif @@ -169,38 +168,13 @@ static void sch_set_dmamode(struct ata_port *ap, struct ata_device *adev) * Zero on success, or -ERRNO value. */ -static int __devinit sch_init_one(struct pci_dev *pdev, - const struct pci_device_id *ent) +static int sch_init_one(struct pci_dev *pdev, const struct pci_device_id *ent) { - static int printed_version; const struct ata_port_info *ppi[] = { &sch_port_info, NULL }; - struct ata_host *host; - int rc; - - if (!printed_version++) - dev_printk(KERN_DEBUG, &pdev->dev, - "version " DRV_VERSION "\n"); - - /* enable device and prepare host */ - rc = pcim_enable_device(pdev); - if (rc) - return rc; - rc = ata_pci_sff_prepare_host(pdev, ppi, &host); - if (rc) - return rc; - pci_set_master(pdev); - return ata_pci_sff_activate_host(host, ata_sff_interrupt, &sch_sht); -} -static int __init sch_init(void) -{ - return pci_register_driver(&sch_pci_driver); -} + ata_print_version_once(&pdev->dev, DRV_VERSION); -static void __exit sch_exit(void) -{ - pci_unregister_driver(&sch_pci_driver); + return ata_pci_bmdma_init_one(pdev, ppi, &sch_sht, NULL, 0); } -module_init(sch_init); -module_exit(sch_exit); +module_pci_driver(sch_pci_driver); |
