scsi: ufs: Replace deprecated PCI functions

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

Replace these functions with pcim_iomap_region().

Signed-off-by: Philipp Stanner <pstanner@redhat.com>
Link: https://lore.kernel.org/r/20241028102428.23118-2-pstanner@redhat.com
Reviewed-by: Bean Huo <beanhuo@micron.com>
Reviewed-by: Adrian Hunter <adrian.hunter@intel.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Philipp Stanner 2024-10-28 11:24:29 +01:00 committed by Martin K. Petersen
parent f8da4c1cad
commit 84c1e27e6c
2 changed files with 6 additions and 10 deletions

View File

@ -80,14 +80,12 @@ tc_dwc_g210_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
pci_set_master(pdev);
err = pcim_iomap_regions(pdev, 1 << 0, UFSHCD);
if (err < 0) {
mmio_base = pcim_iomap_region(pdev, 0, UFSHCD);
if (IS_ERR(mmio_base)) {
dev_err(&pdev->dev, "request and iomap failed\n");
return err;
return PTR_ERR(mmio_base);
}
mmio_base = pcim_iomap_table(pdev)[0];
err = ufshcd_alloc_host(&pdev->dev, &hba);
if (err) {
dev_err(&pdev->dev, "Allocation failed\n");

View File

@ -588,14 +588,12 @@ ufshcd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
pci_set_master(pdev);
err = pcim_iomap_regions(pdev, 1 << 0, UFSHCD);
if (err < 0) {
mmio_base = pcim_iomap_region(pdev, 0, UFSHCD);
if (IS_ERR(mmio_base)) {
dev_err(&pdev->dev, "request and iomap failed\n");
return err;
return PTR_ERR(mmio_base);
}
mmio_base = pcim_iomap_table(pdev)[0];
err = ufshcd_alloc_host(&pdev->dev, &hba);
if (err) {
dev_err(&pdev->dev, "Allocation failed\n");