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