[PATCH] mmc: sdhci-pci: Replace deprecated PCI functions

From: Alper Ak

Date: Thu Sep 17 2026 - 07:13:56 EST


pcim_iomap_regions() and pcim_iomap_table() have been deprecated.
Replace them with pcim_iomap_region(), which requests and maps a single
BAR and returns the mapping directly.

pcim_iomap_region() returns an IOMEM_ERR_PTR() on failure, so check the
result with IS_ERR() and propagate the error with ERR_CAST().

Signed-off-by: Alper Ak <alperyasinak1@xxxxxxxxx>
---
drivers/mmc/host/sdhci-pci-core.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/drivers/mmc/host/sdhci-pci-core.c b/drivers/mmc/host/sdhci-pci-core.c
index b121d896a804..a9000f3bd419 100644
--- a/drivers/mmc/host/sdhci-pci-core.c
+++ b/drivers/mmc/host/sdhci-pci-core.c
@@ -2170,14 +2170,12 @@ static struct sdhci_pci_slot *sdhci_pci_probe_slot(

host->irq = pdev->irq;

- ret = pcim_iomap_regions(pdev, BIT(bar), mmc_hostname(host->mmc));
- if (ret) {
+ host->ioaddr = pcim_iomap_region(pdev, bar, mmc_hostname(host->mmc));
+ if (IS_ERR(host->ioaddr)) {
dev_err(&pdev->dev, "cannot request region\n");
- return ERR_PTR(ret);
+ return ERR_CAST(host->ioaddr);
}

- host->ioaddr = pcim_iomap_table(pdev)[bar];
-
if (chip->fixes && chip->fixes->probe_slot) {
ret = chip->fixes->probe_slot(slot);
if (ret)
--
2.43.0