* [PATCH] nvmem: meson-mx-efuse: Remove nvmem_device from efuse struct
@ 2024-03-05 6:58 Mukesh Ojha
2024-03-07 20:56 ` Martin Blumenstingl
0 siblings, 1 reply; 3+ messages in thread
From: Mukesh Ojha @ 2024-03-05 6:58 UTC (permalink / raw)
To: srinivas.kandagatla, neil.armstrong, khilman
Cc: jbrunet, martin.blumenstingl, linux-arm-kernel, linux-amlogic,
linux-kernel, Mukesh Ojha
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>
---
drivers/nvmem/meson-mx-efuse.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/nvmem/meson-mx-efuse.c b/drivers/nvmem/meson-mx-efuse.c
index 3ff04d5ca8f8..3f01fe03dde5 100644
--- a/drivers/nvmem/meson-mx-efuse.c
+++ b/drivers/nvmem/meson-mx-efuse.c
@@ -43,7 +43,6 @@ struct meson_mx_efuse_platform_data {
struct meson_mx_efuse {
void __iomem *base;
struct clk *core_clk;
- struct nvmem_device *nvmem;
struct nvmem_config config;
};
@@ -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);
- return PTR_ERR_OR_ZERO(efuse->nvmem);
+ return PTR_ERR_OR_ZERO(nvmem);
}
static struct platform_driver meson_mx_efuse_driver = {
--
2.7.4
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvmem: meson-mx-efuse: Remove nvmem_device from efuse struct
2024-03-05 6:58 [PATCH] nvmem: meson-mx-efuse: Remove nvmem_device from efuse struct Mukesh Ojha
@ 2024-03-07 20:56 ` Martin Blumenstingl
2024-03-12 16:12 ` Mukesh Ojha
0 siblings, 1 reply; 3+ messages in thread
From: Martin Blumenstingl @ 2024-03-07 20:56 UTC (permalink / raw)
To: Mukesh Ojha
Cc: srinivas.kandagatla, neil.armstrong, khilman, jbrunet,
linux-arm-kernel, linux-amlogic, linux-kernel
Hello Mukesh,
On Tue, Mar 5, 2024 at 7:58 AM Mukesh Ojha <quic_mojha@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
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] nvmem: meson-mx-efuse: Remove nvmem_device from efuse struct
2024-03-07 20:56 ` Martin Blumenstingl
@ 2024-03-12 16:12 ` Mukesh Ojha
0 siblings, 0 replies; 3+ messages in thread
From: Mukesh Ojha @ 2024-03-12 16:12 UTC (permalink / raw)
To: Martin Blumenstingl
Cc: srinivas.kandagatla, neil.armstrong, khilman, jbrunet,
linux-arm-kernel, linux-amlogic, linux-kernel
Hi Martin,
On 3/8/2024 2:26 AM, Martin Blumenstingl wrote:
> Hello Mukesh,
>
> On Tue, Mar 5, 2024 at 7:58 AM Mukesh Ojha <quic_mojha@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
Thanks.
Sorry for the late reply, was on vacation.
>
> [...]
>> @@ -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);
Sent too soon., change was cached never got commited..
v2:
https://lore.kernel.org/lkml/1710259663-14095-1-git-send-email-quic_mojha@quicinc.com/
Thanks,
-Mukesh
>
>
> Best regards,
> Martin
_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-03-12 16:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-05 6:58 [PATCH] nvmem: meson-mx-efuse: Remove nvmem_device from efuse struct Mukesh Ojha
2024-03-07 20:56 ` Martin Blumenstingl
2024-03-12 16:12 ` Mukesh Ojha
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®