Re: [PATCH] x86/platform/intel-mid: Replace deprecated PCI functions
From: Andy Shevchenko
Date: Tue Nov 05 2024 - 09:52:59 EST
On Tue, Nov 05, 2024 at 12:25:22PM +0100, Philipp Stanner wrote:
> pcim_iomap_table() and pcim_request_regions() have been deprecated in
> commit e354bb84a4c1 ("PCI: Deprecate pcim_iomap_table(),
> pcim_iomap_regions_request_all()") and commit d140f80f60358 ("PCI:
> Deprecate pcim_iomap_regions() in favor of pcim_iomap_region()"),
> respectively.
>
> Replace these functions with pcim_iomap_region().
>
> Additionally, pass the actual driver name to pcim_iomap_region()
> instead of the previous pci_name(), since the 'name' parameter should
> always reflect which driver owns a region.
Reviewed-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
...
> - ret = pcim_iomap_regions(pdev, 1 << 0, pci_name(pdev));
> - if (ret) {
> - dev_err(&pdev->dev, "I/O memory remapping failed\n");
Btw, do we have a similar message to be printed inside the new call?
> - return ret;
> - }
...
> + pwr->regs = pcim_iomap_region(pdev, 0, "intel_mid_pwr");
> + if (IS_ERR(pwr->regs))
> + return PTR_ERR(pwr->regs);
--
With Best Regards,
Andy Shevchenko