Re: [PATCH v2 2/9] fpga/dfl-pci.c: Replace deprecated PCI functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Aug 21, 2024 at 10:19 AM Philipp Stanner <pstanner@xxxxxxxxxx> wrote:
>
> pcim_iomap_regions() and pcim_iomap_table() have been deprecated by the
> PCI subsystem in commit e354bb84a4c1 ("PCI: Deprecate
> pcim_iomap_table(), pcim_iomap_regions_request_all()").
>
> Port dfl-pci.c to the successor, pcim_iomap_region().
>
> Consistently, replace pcim_iounmap_regions() with pcim_iounmap_region().

>  static void __iomem *cci_pci_ioremap_bar0(struct pci_dev *pcidev)
>  {
> -       if (pcim_iomap_regions(pcidev, BIT(0), DRV_NAME))
> +       void __iomem *bar0;
> +
> +       bar0 = pcim_iomap_region(pcidev, 0, DRV_NAME);
> +       if (IS_ERR(bar0))
>                 return NULL;
>
> -       return pcim_iomap_table(pcidev)[0];
> +       return bar0;
>  }

Now this becomes an unneeded wrapper on pcim_ioremap_region(). Can we
kill this helper completely?

-- 
With Best Regards,
Andy Shevchenko





[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux