]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/ata/pata_cs5520.c
PCI: Remove users of pci_enable_device_bars()
[mirror_ubuntu-artful-kernel.git] / drivers / ata / pata_cs5520.c
index ff1eb84c7d22ffa4103741541141272f1f4bd982..7ed279b0a12edb90af54c013261cfadf88a8d5c1 100644 (file)
@@ -198,7 +198,7 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi
        };
        const struct ata_port_info *ppi[2];
        u8 pcicfg;
-       void *iomap[5];
+       void __iomem *iomap[5];
        struct ata_host *host;
        struct ata_ioports *ioaddr;
        int i, rc;
@@ -229,7 +229,7 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi
                return -ENOMEM;
 
        /* Perform set up for DMA */
-       if (pci_enable_device_bars(pdev, 1<<2)) {
+       if (pci_enable_device_io(pdev)) {
                printk(KERN_ERR DRV_NAME ": unable to configure BAR2.\n");
                return -ENODEV;
        }
@@ -299,24 +299,6 @@ static int __devinit cs5520_init_one(struct pci_dev *pdev, const struct pci_devi
        return ata_host_register(host, &cs5520_sht);
 }
 
-/**
- *     cs5520_remove_one       -       device unload
- *     @pdev: PCI device being removed
- *
- *     Handle an unplug/unload event for a PCI device. Unload the
- *     PCI driver but do not use the default handler as we manage
- *     resources ourself and *MUST NOT* disable the device as it has
- *     other functions.
- */
-
-static void __devexit cs5520_remove_one(struct pci_dev *pdev)
-{
-       struct device *dev = pci_dev_to_dev(pdev);
-       struct ata_host *host = dev_get_drvdata(dev);
-
-       ata_host_detach(host);
-}
-
 #ifdef CONFIG_PM
 /**
  *     cs5520_reinit_one       -       device resume
@@ -373,7 +355,7 @@ static struct pci_driver cs5520_pci_driver = {
        .name           = DRV_NAME,
        .id_table       = pata_cs5520,
        .probe          = cs5520_init_one,
-       .remove         = cs5520_remove_one,
+       .remove         = ata_pci_remove_one,
 #ifdef CONFIG_PM
        .suspend        = cs5520_pci_device_suspend,
        .resume         = cs5520_reinit_one,