1 From cfadd0e7d9225566f320bc4dc716682be910be6c Mon Sep 17 00:00:00 2001
2 From: Yangtao Li <frank.li@vivo.com>
3 Date: Wed, 23 Aug 2023 14:27:25 +0100
4 Subject: [PATCH] nvmem: brcm_nvram: Use
5 devm_platform_get_and_ioremap_resource()
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.
11 Signed-off-by: Yangtao Li <frank.li@vivo.com>
12 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
13 Link: https://lore.kernel.org/r/20230823132744.350618-4-srinivas.kandagatla@linaro.org
14 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 drivers/nvmem/brcm_nvram.c | 3 +--
17 1 file changed, 1 insertion(+), 2 deletions(-)
19 --- a/drivers/nvmem/brcm_nvram.c
20 +++ b/drivers/nvmem/brcm_nvram.c
21 @@ -159,8 +159,7 @@ static int brcm_nvram_probe(struct platf
25 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
26 - priv->base = devm_ioremap_resource(dev, res);
27 + priv->base = devm_platform_get_and_ioremap_resource(pdev, 0, &res);
28 if (IS_ERR(priv->base))
29 return PTR_ERR(priv->base);