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
6 nvmem_device is used at one place while registering nvmem
7 device and it is not required to be present in efuse struct
10 Drop nvmem_device and manage with nvmem device stack variable.
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>
18 drivers/nvmem/meson-mx-efuse.c | 6 +++---
19 1 file changed, 3 insertions(+), 3 deletions(-)
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 {
27 - struct nvmem_device *nvmem;
28 struct nvmem_config config;
31 @@ -194,6 +193,7 @@ static int meson_mx_efuse_probe(struct p
33 const struct meson_mx_efuse_platform_data *drvdata;
34 struct meson_mx_efuse *efuse;
35 + struct nvmem_device *nvmem;
37 drvdata = of_device_get_match_data(&pdev->dev);
39 @@ -224,9 +224,9 @@ static int meson_mx_efuse_probe(struct p
40 return PTR_ERR(efuse->core_clk);
43 - efuse->nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
44 + nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
46 - return PTR_ERR_OR_ZERO(efuse->nvmem);
47 + return PTR_ERR_OR_ZERO(nvmem);
50 static struct platform_driver meson_mx_efuse_driver = {