diff mbox series

[3/5] media: intel/ipu6: Replace deprecated PCI functions

Message ID 20250404135344.93241-5-phasta@kernel.org
State New
Headers show
Series [1/5] media: ipu3-cio2: Replace deprecated PCI functions | expand

Commit Message

Philipp Stanner April 4, 2025, 1:53 p.m. UTC
pcim_iomap_table() and pcim_iomap_regions() have been deprecated.
Furthermore, the "name" parameter in pcim_iomap_regions() and its
successor, pcim_iomap_region(), should always reflect the driver name,
whereas currently it is the device's name.

Replace the deprecated functions with pcim_iomap_region() and pass the
actual driver name.

Signed-off-by: Philipp Stanner <phasta@kernel.org>
---
 drivers/media/pci/intel/ipu6/ipu6.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
diff mbox series

Patch

diff --git a/drivers/media/pci/intel/ipu6/ipu6.c b/drivers/media/pci/intel/ipu6/ipu6.c
index 277af7cda8ee..345662542a64 100644
--- a/drivers/media/pci/intel/ipu6/ipu6.c
+++ b/drivers/media/pci/intel/ipu6/ipu6.c
@@ -525,11 +525,11 @@  static int ipu6_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
 	phys = pci_resource_start(pdev, IPU6_PCI_BAR);
 	dev_dbg(dev, "IPU6 PCI bar[%u] = %pa\n", IPU6_PCI_BAR, &phys);
 
-	ret = pcim_iomap_regions(pdev, 1 << IPU6_PCI_BAR, pci_name(pdev));
-	if (ret)
-		return dev_err_probe(dev, ret, "Failed to I/O mem remapping\n");
+	isp->base = pcim_iomap_region(pdev, IPU6_PCI_BAR, IPU6_NAME);
+	if (IS_ERR(isp->base))
+		return dev_err_probe(dev, PTR_ERR(isp->base),
+				     "Failed to I/O mem remapping\n");
 
-	isp->base = pcim_iomap_table(pdev)[IPU6_PCI_BAR];
 	pci_set_drvdata(pdev, isp);
 	pci_set_master(pdev);