linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Yangtao Li <tiny.windzz@gmail.com>
To: manuel.lauss@gmail.com, ulf.hansson@linaro.org,
	khilman@baylibre.com, chaotian.jing@mediatek.com,
	matthias.bgg@gmail.com, nico@fluxnic.net,
	adrian.hunter@intel.com, agross@kernel.org,
	bjorn.andersson@linaro.org, ben-linux@fluff.org,
	jh80.chung@samsung.com, vireshk@kernel.org, mripard@kernel.org,
	wens@csie.org, wsa+renesas@sang-engineering.com,
	gregkh@linuxfoundation.org, kstewart@linuxfoundation.org,
	yamada.masahiro@socionext.com, tglx@linutronix.de,
	allison@lohutok.net, yoshihiro.shimoda.uh@renesas.com,
	geert+renesas@glider.be, linus.walleij@linaro.org
Cc: linux-mmc@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-amlogic@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH 11/13] mmc: mvsdio: convert to devm_platform_ioremap_resource
Date: Sun, 15 Dec 2019 17:51:18 +0000	[thread overview]
Message-ID: <20191215175120.3290-11-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191215175120.3290-1-tiny.windzz@gmail.com>

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
 drivers/mmc/host/mvsdio.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index 74a0a7fbbf7f..203b61712601 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -696,16 +696,14 @@ static int mvsd_probe(struct platform_device *pdev)
 	struct mmc_host *mmc = NULL;
 	struct mvsd_host *host = NULL;
 	const struct mbus_dram_target_info *dram;
-	struct resource *r;
 	int ret, irq;
 
 	if (!np) {
 		dev_err(&pdev->dev, "no DT node\n");
 		return -ENODEV;
 	}
-	r = platform_get_resource(pdev, IORESOURCE_MEM, 0);
 	irq = platform_get_irq(pdev, 0);
-	if (!r || irq < 0)
+	if (irq < 0)
 		return -ENXIO;
 
 	mmc = mmc_alloc_host(sizeof(struct mvsd_host), &pdev->dev);
@@ -758,7 +756,7 @@ static int mvsd_probe(struct platform_device *pdev)
 
 	spin_lock_init(&host->lock);
 
-	host->base = devm_ioremap_resource(&pdev->dev, r);
+	host->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(host->base)) {
 		ret = PTR_ERR(host->base);
 		goto out;
-- 
2.17.1


  parent reply	other threads:[~2019-12-15 17:52 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-15 17:51 [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-15 17:51 ` [PATCH 02/13] mmc: tmio: " Yangtao Li
2019-12-18  9:47   ` Wolfram Sang
2019-12-15 17:51 ` [PATCH 03/13] mmc: meson-mx-sdio: " Yangtao Li
2019-12-15 17:51 ` [PATCH 04/13] mmc: sdhci-s3c: " Yangtao Li
2019-12-15 17:51 ` [PATCH 05/13] mmc: sdhci-spear: " Yangtao Li
2019-12-15 17:51 ` [PATCH 06/13] mmc: sh_mmcif: " Yangtao Li
2019-12-18  9:49   ` Wolfram Sang
2019-12-15 17:51 ` [PATCH 07/13] mmc: sdhci_f_sdh30: " Yangtao Li
2019-12-15 17:51 ` [PATCH 08/13] mmc: sdhci_am654: " Yangtao Li
2019-12-15 17:51 ` [PATCH 09/13] mmc: sdhci-milbeaut: " Yangtao Li
2019-12-15 17:51 ` [PATCH 10/13] mmc: sdhci-msm: " Yangtao Li
2019-12-18  6:30   ` Bjorn Andersson
2019-12-18 14:01     ` Ulf Hansson
2019-12-15 17:51 ` Yangtao Li [this message]
2019-12-15 17:51 ` [PATCH 12/13] mmc: mtk-sd: " Yangtao Li
2019-12-15 17:51 ` [PATCH 13/13] mmc: au1xmmc: switch to platform_get_irq Yangtao Li
2019-12-18 14:01   ` Ulf Hansson
2019-12-18  2:27 ` [PATCH 01/13] mmc: sunxi-mmc: convert to devm_platform_ioremap_resource Chen-Yu Tsai

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=20191215175120.3290-11-tiny.windzz@gmail.com \
    --to=tiny.windzz@gmail.com \
    --cc=adrian.hunter@intel.com \
    --cc=agross@kernel.org \
    --cc=allison@lohutok.net \
    --cc=ben-linux@fluff.org \
    --cc=bjorn.andersson@linaro.org \
    --cc=chaotian.jing@mediatek.com \
    --cc=geert+renesas@glider.be \
    --cc=gregkh@linuxfoundation.org \
    --cc=jh80.chung@samsung.com \
    --cc=khilman@baylibre.com \
    --cc=kstewart@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=manuel.lauss@gmail.com \
    --cc=matthias.bgg@gmail.com \
    --cc=mripard@kernel.org \
    --cc=nico@fluxnic.net \
    --cc=tglx@linutronix.de \
    --cc=ulf.hansson@linaro.org \
    --cc=vireshk@kernel.org \
    --cc=wens@csie.org \
    --cc=wsa+renesas@sang-engineering.com \
    --cc=yamada.masahiro@socionext.com \
    --cc=yoshihiro.shimoda.uh@renesas.com \
    /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;
as well as URLs for NNTP newsgroup(s).