[PATCH] nvmem: meson-mx-efuse: Remove nvmem_device from efuse struct

Martin Blumenstingl martin.blumenstingl at googlemail.com
Thu Mar 7 12:56:55 PST 2024


Hello Mukesh,

On Tue, Mar 5, 2024 at 7:58 AM Mukesh Ojha <quic_mojha at quicinc.com> wrote:
>
> 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.
I'm generally fine with this approach

[...]
> @@ -223,9 +222,9 @@ static int meson_mx_efuse_probe(struct platform_device *pdev)
>                 return PTR_ERR(efuse->core_clk);
>         }
>
> -       efuse->nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
> +       nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);
But this doesn't compile for me:
  CC      drivers/nvmem/meson-mx-efuse.o
../drivers/nvmem/meson-mx-efuse.c: In function 'meson_mx_efuse_probe':
../drivers/nvmem/meson-mx-efuse.c:252:9: error: 'nvmem' undeclared
(first use in this function)
 252 |         nvmem = devm_nvmem_register(&pdev->dev, &efuse->config);


Best regards,
Martin



More information about the linux-amlogic mailing list