* [PATCH] mmc: sdhci-pci: Replace deprecated PCI functions
@ 2026-09-17 11:13 Alper Ak
2026-09-23 16:31 ` Adrian Hunter
0 siblings, 1 reply; 2+ messages in thread
From: Alper Ak @ 2026-09-17 11:13 UTC (permalink / raw)
To: Adrian Hunter, Ulf Hansson; +Cc: Alper Ak, linux-mmc, linux-kernel
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@gmail.com>
---
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] mmc: sdhci-pci: Replace deprecated PCI functions
2026-09-17 11:13 [PATCH] mmc: sdhci-pci: Replace deprecated PCI functions Alper Ak
@ 2026-09-23 16:31 ` Adrian Hunter
0 siblings, 0 replies; 2+ messages in thread
From: Adrian Hunter @ 2026-09-23 16:31 UTC (permalink / raw)
To: Alper Ak, Ulf Hansson; +Cc: linux-mmc, linux-kernel
On 17/09/2026 14:13, Alper Ak wrote:
> 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@gmail.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> 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)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-09-23 16:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-09-17 11:13 [PATCH] mmc: sdhci-pci: Replace deprecated PCI functions Alper Ak
2026-09-23 16:31 ` Adrian Hunter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®