mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Adrian Hunter <adrian.hunter@intel.com>
To: Alper Ak <alperyasinak1@gmail.com>, Ulf Hansson <ulfh@kernel.org>
Cc: <linux-mmc@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] mmc: sdhci-pci: Replace deprecated PCI functions
Date: Wed, 23 Sep 2026 19:31:51 +0300	[thread overview]
Message-ID: <fa3971ce-57ef-4c93-9020-ddb02d625ef0@intel.com> (raw)
In-Reply-To: <20260917111336.1102829-1-alperyasinak1@gmail.com>

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)


      reply	other threads:[~2026-09-23 16:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-17 11:13 Alper Ak
2026-09-23 16:31 ` Adrian Hunter [this message]

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=fa3971ce-57ef-4c93-9020-ddb02d625ef0@intel.com \
    --to=adrian.hunter@intel.com \
    --cc=alperyasinak1@gmail.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®