All of lore.kernel.org
 help / color / mirror / Atom feed
From: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
To: gregkh@linuxfoundation.org
Cc: linux-kernel@vger.kernel.org,
	AngeloGioacchino Del Regno 
	<angelogioacchino.delregno@collabora.com>,
	Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Subject: [PATCH 7/7] nvmem: mtk-efuse: Simplify with devm_platform_get_and_ioremap_resource()
Date: Wed,  6 Jul 2022 11:06:27 +0100	[thread overview]
Message-ID: <20220706100627.6534-8-srinivas.kandagatla@linaro.org> (raw)
In-Reply-To: <20220706100627.6534-1-srinivas.kandagatla@linaro.org>

From: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>

Convert platform_get_resource(), devm_ioremap_resource() to a single
call to devm_platform_get_and_ioremap_resource(), as this is exactly
what this function does.

No functional changes.

Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
---
 drivers/nvmem/mtk-efuse.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/drivers/nvmem/mtk-efuse.c b/drivers/nvmem/mtk-efuse.c
index e9a375dd84af..a08e0aedd21c 100644
--- a/drivers/nvmem/mtk-efuse.c
+++ b/drivers/nvmem/mtk-efuse.c
@@ -41,8 +41,7 @@ static int mtk_efuse_probe(struct platform_device *pdev)
 	if (!priv)
 		return -ENOMEM;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	priv->base = devm_ioremap_resource(dev, res);
+	priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
 	if (IS_ERR(priv->base))
 		return PTR_ERR(priv->base);
 
-- 
2.25.1


      parent reply	other threads:[~2022-07-06 10:08 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-06 10:06 [PATCH 0/7] nvmem: patches (set 1) for 5.20 Srinivas Kandagatla
2022-07-06 10:06 ` [PATCH 1/7] dt-bindings: microchip-otpc: document Microchip OTPC Srinivas Kandagatla
2022-07-06 10:06 ` [PATCH 2/7] nvmem: microchip-otpc: add support Srinivas Kandagatla
2022-07-06 10:06 ` [PATCH 3/7] MAINTAINERS: rectify file pattern in MICROCHIP OTPC DRIVER Srinivas Kandagatla
2022-07-06 10:06 ` [PATCH 4/7] dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema Srinivas Kandagatla
2022-07-06 10:06 ` [PATCH 5/7] dt-bindings: nvmem: mediatek: efuse: add support mt8183 Srinivas Kandagatla
2022-07-06 10:06 ` [PATCH 6/7] dt-bindings: nvmem: mediatek: efuse: add support for mt8186 Srinivas Kandagatla
2022-07-06 10:06 ` Srinivas Kandagatla [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=20220706100627.6534-8-srinivas.kandagatla@linaro.org \
    --to=srinivas.kandagatla@linaro.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.