summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorPhilipp Stanner <pstanner@redhat.com>2024-10-28 11:24:29 +0100
committerMartin K. Petersen <martin.petersen@oracle.com>2024-11-07 02:45:32 +0100
commit84c1e27e6c64919812824a60001988fc384840ce (patch)
tree7aa21908b1b1e18b5e0fa08b13e0586ccadd0889 /drivers
parentscsi: Switch back to struct platform_driver::remove() (diff)
downloadlinux-84c1e27e6c64919812824a60001988fc384840ce.tar.xz
linux-84c1e27e6c64919812824a60001988fc384840ce.zip
scsi: ufs: Replace deprecated PCI functions
pcim_iomap_regions() and pcim_iomap_table() have been deprecated in commit e354bb84a4c1 ("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>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/ufs/host/tc-dwc-g210-pci.c8
-rw-r--r--drivers/ufs/host/ufshcd-pci.c8
2 files changed, 6 insertions, 10 deletions
diff --git a/drivers/ufs/host/tc-dwc-g210-pci.c b/drivers/ufs/host/tc-dwc-g210-pci.c
index 876781fd6861..0167d8bef71a 100644
--- a/drivers/ufs/host/tc-dwc-g210-pci.c
+++ b/drivers/ufs/host/tc-dwc-g210-pci.c
@@ -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");
diff --git a/drivers/ufs/host/ufshcd-pci.c b/drivers/ufs/host/ufshcd-pci.c
index 54e0cc0653a2..ea39c5d5b8cf 100644
--- a/drivers/ufs/host/ufshcd-pci.c
+++ b/drivers/ufs/host/ufshcd-pci.c
@@ -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");