Skip to content

Commit 96ee809

Browse files
Philipp Stannerbjorn-helgaas
authored andcommitted
misc: Use never-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. cardreader/rtsx_pcr.c and tifm_7xx1.c enable their PCI devices with pci_enable_device(). Thus, they need the never-managed version. Replace pci_intx() with pci_intx_unmanaged(). Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Philipp Stanner <[email protected]> Signed-off-by: Bjorn Helgaas <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]>
1 parent f72acbe commit 96ee809

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

drivers/misc/cardreader/rtsx_pcr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1057,7 +1057,7 @@ static int rtsx_pci_acquire_irq(struct rtsx_pcr *pcr)
10571057
}
10581058

10591059
pcr->irq = pcr->pci->irq;
1060-
pci_intx(pcr->pci, !pcr->msi_en);
1060+
pci_intx_unmanaged(pcr->pci, !pcr->msi_en);
10611061

10621062
return 0;
10631063
}

drivers/misc/tifm_7xx1.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -327,7 +327,7 @@ static int tifm_7xx1_probe(struct pci_dev *dev,
327327
goto err_out;
328328
}
329329

330-
pci_intx(dev, 1);
330+
pci_intx_unmanaged(dev, 1);
331331

332332
fm = tifm_alloc_adapter(dev->device == PCI_DEVICE_ID_TI_XX21_XX11_FM
333333
? 4 : 2, &dev->dev);
@@ -368,7 +368,7 @@ static int tifm_7xx1_probe(struct pci_dev *dev,
368368
err_out_free:
369369
tifm_free_adapter(fm);
370370
err_out_int:
371-
pci_intx(dev, 0);
371+
pci_intx_unmanaged(dev, 0);
372372
pci_release_regions(dev);
373373
err_out:
374374
if (!pci_dev_busy)
@@ -392,7 +392,7 @@ static void tifm_7xx1_remove(struct pci_dev *dev)
392392
tifm_7xx1_sock_power_off(tifm_7xx1_sock_addr(fm->addr, cnt));
393393

394394
iounmap(fm->addr);
395-
pci_intx(dev, 0);
395+
pci_intx_unmanaged(dev, 0);
396396
pci_release_regions(dev);
397397

398398
pci_disable_device(dev);

0 commit comments

Comments
 (0)