Skip to content

Commit eeda4c8

Browse files
Philipp Stannerbjorn-helgaas
authored andcommitted
ata: Use always-managed version of pci_intx()
pci_intx() is a hybrid function which can sometimes be managed through devres. To remove this hybrid nature from pci_intx(), it is necessary to port users to either an always-managed or a never-managed version. All users in ata enable their PCI devices with pcim_enable_device(). Thus, they need the always-managed version. Replace pci_intx() with pcim_intx(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Philipp Stanner <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Reviewed-by: Sergey Shtylyov <[email protected]> Acked-by: Niklas Cassel <[email protected]>
1 parent b182cba commit eeda4c8

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

drivers/ata/ahci.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1987,7 +1987,7 @@ static int ahci_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
19871987

19881988
if (ahci_init_msi(pdev, n_ports, hpriv) < 0) {
19891989
/* legacy intx interrupts */
1990-
pci_intx(pdev, 1);
1990+
pcim_intx(pdev, 1);
19911991
}
19921992
hpriv->irq = pci_irq_vector(pdev, 0);
19931993

drivers/ata/ata_piix.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1725,7 +1725,7 @@ static int piix_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
17251725
* message-signalled interrupts currently).
17261726
*/
17271727
if (port_flags & PIIX_FLAG_CHECKINTR)
1728-
pci_intx(pdev, 1);
1728+
pcim_intx(pdev, 1);
17291729

17301730
if (piix_check_450nx_errata(pdev)) {
17311731
/* This writes into the master table but it does not

drivers/ata/pata_rdc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,7 @@ static int rdc_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
340340
return rc;
341341
host->private_data = hpriv;
342342

343-
pci_intx(pdev, 1);
343+
pcim_intx(pdev, 1);
344344

345345
host->flags |= ATA_HOST_PARALLEL_SCAN;
346346

drivers/ata/sata_sil24.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1317,7 +1317,7 @@ static int sil24_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
13171317

13181318
if (sata_sil24_msi && !pci_enable_msi(pdev)) {
13191319
dev_info(&pdev->dev, "Using MSI\n");
1320-
pci_intx(pdev, 0);
1320+
pcim_intx(pdev, 0);
13211321
}
13221322

13231323
pci_set_master(pdev);

drivers/ata/sata_sis.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static int sis_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
290290
}
291291

292292
pci_set_master(pdev);
293-
pci_intx(pdev, 1);
293+
pcim_intx(pdev, 1);
294294
return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt,
295295
IRQF_SHARED, &sis_sht);
296296
}

drivers/ata/sata_uli.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ static int uli_init_one(struct pci_dev *pdev, const struct pci_device_id *ent)
221221
}
222222

223223
pci_set_master(pdev);
224-
pci_intx(pdev, 1);
224+
pcim_intx(pdev, 1);
225225
return ata_host_activate(host, pdev->irq, ata_bmdma_interrupt,
226226
IRQF_SHARED, &uli_sht);
227227
}

drivers/ata/sata_vsc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,7 @@ static int vsc_sata_init_one(struct pci_dev *pdev,
384384
pci_write_config_byte(pdev, PCI_CACHE_LINE_SIZE, 0x80);
385385

386386
if (pci_enable_msi(pdev) == 0)
387-
pci_intx(pdev, 0);
387+
pcim_intx(pdev, 0);
388388

389389
/*
390390
* Config offset 0x98 is "Extended Control and Status Register 0"

0 commit comments

Comments
 (0)