From: Yangtao Li <tiny.windzz@gmail.com>
To: gregkh@linuxfoundation.org, rafael@kernel.org,
srinivas.kandagatla@linaro.org, vz@mleia.com,
khilman@baylibre.com, mripard@kernel.org, wens@csie.org,
andriy.shevchenko@linux.intel.com, mchehab+samsung@kernel.org,
mans@mansr.com, treding@nvidia.com, suzuki.poulose@arm.com,
bgolaszewski@baylibre.com, tglx@linutronix.de
Cc: linux-kernel@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-amlogic@lists.infradead.org,
Yangtao Li <tiny.windzz@gmail.com>
Subject: [PATCH 3/5] nvmem: meson-mx-efuse: convert to devm_platform_ioremap_resource
Date: Tue, 10 Dec 2019 20:31:48 +0000 [thread overview]
Message-ID: <20191210203149.7115-4-tiny.windzz@gmail.com> (raw)
In-Reply-To: <20191210203149.7115-1-tiny.windzz@gmail.com>
Use devm_platform_ioremap_resource() to simplify code.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/nvmem/meson-mx-efuse.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/nvmem/meson-mx-efuse.c b/drivers/nvmem/meson-mx-efuse.c
index 07c9f38c1c60..24c6e8b15987 100644
--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -194,7 +194,6 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
{
const struct meson_mx_efuse_platform_data *drvdata;
struct meson_mx_efuse *efuse;
- struct resource *res;
drvdata = of_device_get_match_data(&pdev->dev);
if (!drvdata)
@@ -204,8 +203,7 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
if (!efuse)
return -ENOMEM;
- res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
- efuse->base = devm_ioremap_resource(&pdev->dev, res);
+ efuse->base = devm_platform_ioremap_resource(pdev, 0);
if (IS_ERR(efuse->base))
return PTR_ERR(efuse->base);
--
2.17.1
next prev parent reply other threads:[~2019-12-10 20:32 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-10 20:31 [PATCH] drivers: add devm_platform_ioremap_resource_byname() helper Yangtao Li
2019-12-10 20:31 ` [PATCH 1/5] nvmem: sunxi_sid: convert to devm_platform_ioremap_resource Yangtao Li
2019-12-10 20:34 ` Frank Lee
2019-12-18 2:46 ` Chen-Yu Tsai
2019-12-10 20:31 ` [PATCH 2/5] nvmem: lpc18xx_otp: " Yangtao Li
2019-12-10 20:31 ` Yangtao Li [this message]
2019-12-10 20:41 ` [PATCH 3/5] nvmem: meson-mx-efuse: " Martin Blumenstingl
2019-12-10 20:31 ` [PATCH 4/5] nvmem: bcm-ocotp: " Yangtao Li
2019-12-28 17:39 ` [PATCH] drivers: add devm_platform_ioremap_resource_byname() helper Frank Lee
2019-12-29 12:13 ` Bartosz Golaszewski
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=20191210203149.7115-4-tiny.windzz@gmail.com \
--to=tiny.windzz@gmail.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=bgolaszewski@baylibre.com \
--cc=gregkh@linuxfoundation.org \
--cc=khilman@baylibre.com \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mans@mansr.com \
--cc=mchehab+samsung@kernel.org \
--cc=mripard@kernel.org \
--cc=rafael@kernel.org \
--cc=srinivas.kandagatla@linaro.org \
--cc=suzuki.poulose@arm.com \
--cc=tglx@linutronix.de \
--cc=treding@nvidia.com \
--cc=vz@mleia.com \
--cc=wens@csie.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;
as well as URLs for NNTP newsgroup(s).