7770052d97d6cf3ab92f6b18b908d5b7673f2d7a
[openwrt/staging/thess.git] /
1 From 2a1ad6b75292d38aa2f6ded7335979e0632521da Mon Sep 17 00:00:00 2001
2 From: Mukesh Ojha <quic_mojha@quicinc.com>
3 Date: Tue, 30 Apr 2024 09:49:21 +0100
4 Subject: [PATCH] nvmem: meson-mx-efuse: Remove nvmem_device from efuse struct
5
6 nvmem_device is used at one place while registering nvmem
7 device and it is not required to be present in efuse struct
8 for just this purpose.
9
10 Drop nvmem_device and manage with nvmem device stack variable.
11
12 Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com>
13 Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
14 Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
15 Link: https://lore.kernel.org/r/20240430084921.33387-12-srinivas.kandagatla@linaro.org
16 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
17 ---
18 drivers/nvmem/meson-mx-efuse.c | 6 +++---
19 1 file changed, 3 insertions(+), 3 deletions(-)
20
21 --- a/drivers/nvmem/meson-mx-efuse.c
22 +++ b/drivers/nvmem/meson-mx-efuse.c
23 @@ -44,7 +44,6 @@ struct meson_mx_efuse_platform_data {
24 struct meson_mx_efuse {
25 void __iomem *base;
26 struct clk *core_clk;
27 - struct nvmem_device *nvmem;
28 struct nvmem_config config;
29 };
30
31 @@ -194,6 +193,7 @@ static int meson_mx_efuse_probe(struct p
32 {
33 const struct meson_mx_efuse_platform_data *drvdata;
34 struct meson_mx_efuse *efuse;
35 + struct nvmem_device *nvmem;
36
37 drvdata = of_device_get_match_data(&pdev->dev);
38 if (!drvdata)
39 @@ -224,9 +224,9 @@ static int meson_mx_efuse_probe(struct p
40 return PTR_ERR(efuse->core_clk);
41 }
42
43 - efuse->nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
44 + nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
45
46 - return PTR_ERR_OR_ZERO(efuse->nvmem);
47 + return PTR_ERR_OR_ZERO(nvmem);
48 }
49
50 static struct platform_driver meson_mx_efuse_driver = {