Skip to content

Commit 2a1ad6b

Browse files
Mukesh Ojhagregkh
authored andcommitted
nvmem: meson-mx-efuse: Remove nvmem_device from efuse struct
nvmem_device is used at one place while registering nvmem device and it is not required to be present in efuse struct for just this purpose. Drop nvmem_device and manage with nvmem device stack variable. Signed-off-by: Mukesh Ojha <quic_mojha@quicinc.com> Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com> Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Link: https://lore.kernel.org/r/20240430084921.33387-12-srinivas.kandagatla@linaro.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent a5888ae commit 2a1ad6b

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

drivers/nvmem/meson-mx-efuse.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ struct meson_mx_efuse_platform_data {
4343
struct meson_mx_efuse {
4444
void __iomem *base;
4545
struct clk *core_clk;
46-
struct nvmem_device *nvmem;
4746
struct nvmem_config config;
4847
};
4948

@@ -193,6 +192,7 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
193192
{
194193
const struct meson_mx_efuse_platform_data *drvdata;
195194
struct meson_mx_efuse *efuse;
195+
struct nvmem_device *nvmem;
196196

197197
drvdata = of_device_get_match_data(&pdev->dev);
198198
if (!drvdata)
@@ -223,9 +223,9 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
223223
return PTR_ERR(efuse->core_clk);
224224
}
225225

226-
efuse->nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
226+
nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
227227

228-
return PTR_ERR_OR_ZERO(efuse->nvmem);
228+
return PTR_ERR_OR_ZERO(nvmem);
229229
}
230230

231231
static struct platform_driver meson_mx_efuse_driver = {

0 commit comments

Comments
 (0)