da077eb4b745f6192d6d401fdf1d5442e852571b
[openwrt/staging/neocturne.git] /
1 From 0a223a097709b99a0ba738d6be5b4f52c04ffb64 Mon Sep 17 00:00:00 2001
2 From: Yangtao Li <frank.li@vivo.com>
3 Date: Wed, 23 Aug 2023 14:27:27 +0100
4 Subject: [PATCH] nvmem: meson-mx-efuse: Convert to
5 devm_platform_ioremap_resource()
6
7 Use devm_platform_ioremap_resource() to simplify code.
8
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-6-srinivas.kandagatla@linaro.org
12 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
13 ---
14 drivers/nvmem/meson-mx-efuse.c | 4 +---
15 1 file changed, 1 insertion(+), 3 deletions(-)
16
17 --- a/drivers/nvmem/meson-mx-efuse.c
18 +++ b/drivers/nvmem/meson-mx-efuse.c
19 @@ -194,7 +194,6 @@ static int meson_mx_efuse_probe(struct p
20 {
21 const struct meson_mx_efuse_platform_data *drvdata;
22 struct meson_mx_efuse *efuse;
23 - struct resource *res;
24
25 drvdata = of_device_get_match_data(&pdev->dev);
26 if (!drvdata)
27 @@ -204,8 +203,7 @@ static int meson_mx_efuse_probe(struct p
28 if (!efuse)
29 return -ENOMEM;
30
31 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
32 - efuse->base = devm_ioremap_resource(&pdev->dev, res);
33 + efuse->base = devm_platform_ioremap_resource(pdev, 0);
34 if (IS_ERR(efuse->base))
35 return PTR_ERR(efuse->base);
36