]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
media: intel/ipu6: Replace deprecated PCI functions
authorPhilipp Stanner <phasta@kernel.org>
Fri, 4 Apr 2025 13:53:43 +0000 (15:53 +0200)
committerHans Verkuil <hverkuil@xs4all.nl>
Fri, 25 Apr 2025 08:15:29 +0000 (10:15 +0200)
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>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
drivers/media/pci/intel/ipu6/ipu6.c

index b00d0705fefa867cdce0a6a90e074ede77a2f1d4..1f4f20b9c94dc7017cdbb587498b748a5dfbd4bb 100644 (file)
@@ -520,11 +520,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);