dc144ddfbdfa86af3e2734185b28544e88155344
[openwrt/staging/neocturne.git] /
1 From 94904db28db49ac8fbb2a273d25156db26a3a985 Mon Sep 17 00:00:00 2001
2 From: Yangtao Li <frank.li@vivo.com>
3 Date: Wed, 23 Aug 2023 14:27:28 +0100
4 Subject: [PATCH] nvmem: rockchip-efuse: Use
5 devm_platform_get_and_ioremap_resource()
6
7 Convert platform_get_resource(), devm_ioremap_resource() to a single
8 call to devm_platform_get_and_ioremap_resource(), as this is exactly
9 what this function does.
10
11 Signed-off-by: Yangtao Li <frank.li@vivo.com>
12 Reviewed-by: Heiko Stuebner <heiko@sntech.de>
13 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
14 Link: https://lore.kernel.org/r/20230823132744.350618-7-srinivas.kandagatla@linaro.org
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 ---
17 drivers/nvmem/rockchip-efuse.c | 3 +--
18 1 file changed, 1 insertion(+), 2 deletions(-)
19
20 --- a/drivers/nvmem/rockchip-efuse.c
21 +++ b/drivers/nvmem/rockchip-efuse.c
22 @@ -267,8 +267,7 @@ static int rockchip_efuse_probe(struct p
23 if (!efuse)
24 return -ENOMEM;
25
26 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
27 - efuse->base = devm_ioremap_resource(dev, res);
28 + efuse->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
29 if (IS_ERR(efuse->base))
30 return PTR_ERR(efuse->base);
31