linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/8] nvmem: sunxi_sid: Convert to devm_platform_ioremap_resource()
@ 2023-07-06  4:04 Yangtao Li
  2023-07-06  4:04 ` [PATCH 3/8] nvmem: lpc18xx_otp: " Yangtao Li
                   ` (6 more replies)
  0 siblings, 7 replies; 9+ messages in thread
From: Yangtao Li @ 2023-07-06  4:04 UTC (permalink / raw)
  To: Srinivas Kandagatla, Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
  Cc: Yangtao Li, linux-arm-kernel, linux-sunxi, linux-kernel

Use devm_platform_ioremap_resource() to simplify code.

Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 drivers/nvmem/sunxi_sid.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/nvmem/sunxi_sid.c b/drivers/nvmem/sunxi_sid.c
index a970f1741cc6..6bfe02ab169a 100644
--- a/drivers/nvmem/sunxi_sid.c
+++ b/drivers/nvmem/sunxi_sid.c
@@ -125,7 +125,6 @@ static int sun8i_sid_read_by_reg(void *context, unsigned int offset,
 static int sunxi_sid_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct resource *res;
 	struct nvmem_config *nvmem_cfg;
 	struct nvmem_device *nvmem;
 	struct sunxi_sid *sid;
@@ -142,8 +141,7 @@ static int sunxi_sid_probe(struct platform_device *pdev)
 		return -EINVAL;
 	sid->value_offset = cfg->value_offset;
 
-	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
-	sid->base = devm_ioremap_resource(dev, res);
+	sid->base = devm_platform_ioremap_resource(pdev, 0);
 	if (IS_ERR(sid->base))
 		return PTR_ERR(sid->base);
 
-- 
2.39.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-07-13 10:06 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-06  4:04 [PATCH 1/8] nvmem: sunxi_sid: Convert to devm_platform_ioremap_resource() Yangtao Li
2023-07-06  4:04 ` [PATCH 3/8] nvmem: lpc18xx_otp: " Yangtao Li
2023-07-06  4:05 ` [PATCH 4/8] nvmem: meson-mx-efuse: " Yangtao Li
2023-07-06  4:05 ` [PATCH 5/8] nvmem: rockchip-efuse: Use devm_platform_get_and_ioremap_resource() Yangtao Li
2023-07-11 13:35   ` Heiko Stuebner
2023-07-06  4:05 ` [PATCH 6/8] nvmem: stm32-romem: " Yangtao Li
2023-07-06  4:05 ` [PATCH 8/8] nvmem: uniphier: " Yangtao Li
2023-07-11 18:26 ` [PATCH 1/8] nvmem: sunxi_sid: Convert to devm_platform_ioremap_resource() Jernej Škrabec
2023-07-13 10:05 ` Srinivas Kandagatla

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).