1 From 0b49178e2b6b4aac3c7fa3ce8d8c02208a13b988 Mon Sep 17 00:00:00 2001
2 From: Yangtao Li <frank.li@vivo.com>
3 Date: Wed, 23 Aug 2023 14:27:26 +0100
4 Subject: [PATCH] nvmem: lpc18xx_otp: Convert to
5 devm_platform_ioremap_resource()
7 Use devm_platform_ioremap_resource() to simplify code.
9 Signed-off-by: Yangtao Li <frank.li@vivo.com>
10 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
11 Link: https://lore.kernel.org/r/20230823132744.350618-5-srinivas.kandagatla@linaro.org
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
14 drivers/nvmem/lpc18xx_otp.c | 4 +---
15 1 file changed, 1 insertion(+), 3 deletions(-)
17 --- a/drivers/nvmem/lpc18xx_otp.c
18 +++ b/drivers/nvmem/lpc18xx_otp.c
19 @@ -68,14 +68,12 @@ static int lpc18xx_otp_probe(struct plat
21 struct nvmem_device *nvmem;
22 struct lpc18xx_otp *otp;
23 - struct resource *res;
25 otp = devm_kzalloc(&pdev->dev, sizeof(*otp), GFP_KERNEL);
29 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
30 - otp->base = devm_ioremap_resource(&pdev->dev, res);
31 + otp->base = devm_platform_ioremap_resource(pdev, 0);
32 if (IS_ERR(otp->base))
33 return PTR_ERR(otp->base);