From: Alper Ak <alperyasinak1@gmail.com>
To: Adrian Hunter <adrian.hunter@intel.com>, Ulf Hansson <ulfh@kernel.org>
Cc: Alper Ak <alperyasinak1@gmail.com>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mmc: sdhci-pci: Replace deprecated PCI functions
Date: Thu, 17 Sep 2026 14:13:35 +0300 [thread overview]
Message-ID: <20260917111336.1102829-1-alperyasinak1@gmail.com> (raw)
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
next reply other threads:[~2026-09-17 11:13 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-17 11:13 Alper Ak [this message]
2026-09-23 16:31 ` Adrian Hunter
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260917111336.1102829-1-alperyasinak1@gmail.com \
--to=alperyasinak1@gmail.com \
--cc=adrian.hunter@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulfh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®