Skip to content

Commit 84c1e27

Browse files
Philipp Stannermartinkpetersen
authored andcommitted
scsi: ufs: Replace deprecated PCI functions
pcim_iomap_regions() and pcim_iomap_table() have been deprecated in commit e354bb8 ("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>
1 parent f8da4c1 commit 84c1e27

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

drivers/ufs/host/tc-dwc-g210-pci.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,12 @@ tc_dwc_g210_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
8080

8181
pci_set_master(pdev);
8282

83-
err = pcim_iomap_regions(pdev, 1 << 0, UFSHCD);
84-
if (err < 0) {
83+
mmio_base = pcim_iomap_region(pdev, 0, UFSHCD);
84+
if (IS_ERR(mmio_base)) {
8585
dev_err(&pdev->dev, "request and iomap failed\n");
86-
return err;
86+
return PTR_ERR(mmio_base);
8787
}
8888

89-
mmio_base = pcim_iomap_table(pdev)[0];
90-
9189
err = ufshcd_alloc_host(&pdev->dev, &hba);
9290
if (err) {
9391
dev_err(&pdev->dev, "Allocation failed\n");

drivers/ufs/host/ufshcd-pci.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -588,14 +588,12 @@ ufshcd_pci_probe(struct pci_dev *pdev, const struct pci_device_id *id)
588588

589589
pci_set_master(pdev);
590590

591-
err = pcim_iomap_regions(pdev, 1 << 0, UFSHCD);
592-
if (err < 0) {
591+
mmio_base = pcim_iomap_region(pdev, 0, UFSHCD);
592+
if (IS_ERR(mmio_base)) {
593593
dev_err(&pdev->dev, "request and iomap failed\n");
594-
return err;
594+
return PTR_ERR(mmio_base);
595595
}
596596

597-
mmio_base = pcim_iomap_table(pdev)[0];
598-
599597
err = ufshcd_alloc_host(&pdev->dev, &hba);
600598
if (err) {
601599
dev_err(&pdev->dev, "Allocation failed\n");

0 commit comments

Comments
 (0)