Skip to contentSkip to conversation

firewire: ohci: Replace deprecated PCI functions

PATCH In review Philipp Stanner 2 participants 2 messages Oct 28, 2024 – Oct 29, 2024 Firewire

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 firewire: ohci: Replace deprecated PCI functions

pcim_iomap_regions() and pcim_iomap_table() have been deprecated in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()").

Replace these functions with pcim_iomap_region().

---
 drivers/firewire/ohci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)
drivers/firewire/ohci.c +2 -3
index 7ee55c2804de..3c045a6fd2ef 100644
@@ -3726,12 +3726,11 @@ static int pci_probe(struct pci_dev *dev,
 		return -ENXIO;
 	}
 
-	err = pcim_iomap_regions(dev, 1 << 0, ohci_driver_name);
-	if (err) {
+	ohci->registers = pcim_iomap_region(dev, 0, ohci_driver_name);
+	if (IS_ERR(ohci->registers)) {
 		ohci_err(ohci, "request and map MMIO resource unavailable\n");
 		return -ENXIO;
 	}
-	ohci->registers = pcim_iomap_table(dev)[0];
 
 	for (i = 0; i < ARRAY_SIZE(ohci_quirks); i++)
 		if ((ohci_quirks[i].vendor == dev->vendor) &&
Signature · 1 line
2.47.0
maintainer
#1 lore raw

Hi,

Quoted 10 lines · Philipp Stanner

pcim_iomap_regions() and pcim_iomap_table() have been deprecated in commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(), pcim_iomap_regions_request_all()").

Replace these functions with pcim_iomap_region().

---
 drivers/firewire/ohci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

Oh, the API has been made available outside of PCI subsystem, great. Applied to for-next branch.

Thanks

Takashi Sakamoto