From: Adrian Hunter <adrian.hunter@intel.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>,
Ulf Hansson <ulf.hansson@linaro.org>,
Victor Shih <victor.shih@genesyslogic.com.tw>,
linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 4/6] mmc: sdhci-acpi: Use devm_platform_ioremap_resource()
Date: Mon, 9 Dec 2024 13:26:30 +0200 [thread overview]
Message-ID: <4aa50389-ff14-4144-a07e-d1ef97449a89@intel.com> (raw)
In-Reply-To: <20241101101441.3518612-5-andriy.shevchenko@linux.intel.com>
On 1/11/24 12:11, Andy Shevchenko wrote:
> The struct resource is not used for anything else, so we can simplify
> the code a bit by using the helper function.
>
> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Adrian Hunter <adrian.hunter@intel.com>
> ---
> drivers/mmc/host/sdhci-acpi.c | 17 +++--------------
> 1 file changed, 3 insertions(+), 14 deletions(-)
>
> diff --git a/drivers/mmc/host/sdhci-acpi.c b/drivers/mmc/host/sdhci-acpi.c
> index f861e9a3a911..8e265b53d7ce 100644
> --- a/drivers/mmc/host/sdhci-acpi.c
> +++ b/drivers/mmc/host/sdhci-acpi.c
> @@ -822,8 +822,6 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
> struct acpi_device *device;
> struct sdhci_acpi_host *c;
> struct sdhci_host *host;
> - struct resource *iomem;
> - resource_size_t len;
> size_t priv_size;
> int quirks = 0;
> int err;
> @@ -844,14 +842,6 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
> if (sdhci_acpi_byt_defer(dev))
> return -EPROBE_DEFER;
>
> - iomem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> - if (!iomem)
> - return -ENOMEM;
> -
> - len = resource_size(iomem);
> - if (!devm_request_mem_region(dev, iomem->start, len, dev_name(dev)))
> - return -ENOMEM;
> -
> priv_size = slot ? slot->priv_size : 0;
> host = sdhci_alloc_host(dev, sizeof(struct sdhci_acpi_host) + priv_size);
> if (IS_ERR(host))
> @@ -873,10 +863,9 @@ static int sdhci_acpi_probe(struct platform_device *pdev)
> goto err_free;
> }
>
> - host->ioaddr = devm_ioremap(dev, iomem->start,
> - resource_size(iomem));
> - if (host->ioaddr == NULL) {
> - err = -ENOMEM;
> + host->ioaddr = devm_platform_ioremap_resource(pdev, 0);
> + if (IS_ERR(host->ioaddr)) {
> + err = PTR_ERR(host->ioaddr);
> goto err_free;
> }
>
next prev parent reply other threads:[~2024-12-09 11:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 10:11 [PATCH v2 0/6] mmc: sdhci-acpi: A few cleanups Andy Shevchenko
2024-11-01 10:11 ` [PATCH v2 1/6] mmc: sdhci: Use EXPORT_PM_FN_NS_GPL() for exporting PM functions Andy Shevchenko
2024-12-09 10:38 ` Adrian Hunter
2024-12-09 16:36 ` Andy Shevchenko
2024-12-09 17:11 ` Adrian Hunter
2025-01-16 15:14 ` Andy Shevchenko
2025-01-16 16:55 ` Richard Fitzgerald
2024-11-01 10:11 ` [PATCH v2 2/6] mmc: sdhci-acpi: Switch to SYSTEM_SLEEP_PM_OPS()/RUNTIME_PM_OPS() and pm_ptr() Andy Shevchenko
2024-12-09 11:00 ` Adrian Hunter
2024-11-01 10:11 ` [PATCH v2 3/6] mmc: sdhci-acpi: Remove not so useful error message Andy Shevchenko
2024-12-09 11:05 ` Adrian Hunter
2024-11-01 10:11 ` [PATCH v2 4/6] mmc: sdhci-acpi: Use devm_platform_ioremap_resource() Andy Shevchenko
2024-12-09 11:26 ` Adrian Hunter [this message]
2024-11-01 10:11 ` [PATCH v2 5/6] mmc: sdhci-acpi: Tidy up ACPI ID table Andy Shevchenko
2024-12-09 11:29 ` Adrian Hunter
2024-12-09 16:40 ` Andy Shevchenko
2025-01-16 15:16 ` Andy Shevchenko
2024-11-01 10:11 ` [PATCH v2 6/6] mmc: sdhci-acpi: Don't use "proxy" headers Andy Shevchenko
2024-12-09 11:32 ` Adrian Hunter
2024-12-09 16:43 ` Andy Shevchenko
2024-12-02 15:24 ` [PATCH v2 0/6] mmc: sdhci-acpi: A few cleanups Ulf Hansson
2024-12-02 15:31 ` Andy Shevchenko
2024-12-18 15:55 ` Ulf Hansson
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=4aa50389-ff14-4144-a07e-d1ef97449a89@intel.com \
--to=adrian.hunter@intel.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mmc@vger.kernel.org \
--cc=ulf.hansson@linaro.org \
--cc=victor.shih@genesyslogic.com.tw \
/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