890dacd08dbef819e471c0c3f78530461e52d5e0
[openwrt/staging/xback.git] /
1 From 649409990d2e93fac657be7c6960c28a2c601d65 Mon Sep 17 00:00:00 2001
2 From: Yang Li <yang.lee@linux.alibaba.com>
3 Date: Tue, 4 Apr 2023 18:21:39 +0100
4 Subject: [PATCH] nvmem: nintendo-otp: Use devm_platform_ioremap_resource()
5
6 According to commit 7945f929f1a7 ("drivers: provide
7 devm_platform_ioremap_resource()"), convert platform_get_resource(),
8 devm_ioremap_resource() to a single call to use
9 devm_platform_ioremap_resource(), as this is exactly what this function
10 does.
11
12 Signed-off-by: Yang Li <yang.lee@linux.alibaba.com>
13 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
14 Link: https://lore.kernel.org/r/20230404172148.82422-32-srinivas.kandagatla@linaro.org
15 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
16 ---
17 drivers/nvmem/nintendo-otp.c | 4 +---
18 1 file changed, 1 insertion(+), 3 deletions(-)
19
20 --- a/drivers/nvmem/nintendo-otp.c
21 +++ b/drivers/nvmem/nintendo-otp.c
22 @@ -76,7 +76,6 @@ static int nintendo_otp_probe(struct pla
23 struct device *dev = &pdev->dev;
24 const struct of_device_id *of_id =
25 of_match_device(nintendo_otp_of_table, dev);
26 - struct resource *res;
27 struct nvmem_device *nvmem;
28 struct nintendo_otp_priv *priv;
29
30 @@ -92,8 +91,7 @@ static int nintendo_otp_probe(struct pla
31 if (!priv)
32 return -ENOMEM;
33
34 - res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
35 - priv->regs = devm_ioremap_resource(dev, res);
36 + priv->regs = devm_platform_ioremap_resource(pdev, 0);
37 if (IS_ERR(priv->regs))
38 return PTR_ERR(priv->regs);
39