* [PATCH] nvmem: make nvmem_bus_type constant
@ 2025-07-01 12:02 Greg Kroah-Hartman
2025-07-11 16:38 ` Srinivas Kandagatla
0 siblings, 1 reply; 2+ messages in thread
From: Greg Kroah-Hartman @ 2025-07-01 12:02 UTC (permalink / raw)
To: linux-kernel; +Cc: Greg Kroah-Hartman, Srinivas Kandagatla
Now that the driver core can properly handle constant struct bus_type,
move the nvmem_bus_type variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.
Cc: Srinivas Kandagatla <srini@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
drivers/nvmem/core.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/core.c b/drivers/nvmem/core.c
index fd2a9698d1c9..e74bfb956dac 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -544,7 +544,7 @@ static const struct device_type nvmem_provider_type = {
.release = nvmem_release,
};
-static struct bus_type nvmem_bus_type = {
+static const struct bus_type nvmem_bus_type = {
.name = "nvmem",
};
--
2.50.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] nvmem: make nvmem_bus_type constant
2025-07-01 12:02 [PATCH] nvmem: make nvmem_bus_type constant Greg Kroah-Hartman
@ 2025-07-11 16:38 ` Srinivas Kandagatla
0 siblings, 0 replies; 2+ messages in thread
From: Srinivas Kandagatla @ 2025-07-11 16:38 UTC (permalink / raw)
To: linux-kernel, Greg Kroah-Hartman
On Tue, 01 Jul 2025 14:02:24 +0200, Greg Kroah-Hartman wrote:
> Now that the driver core can properly handle constant struct bus_type,
> move the nvmem_bus_type variable to be a constant structure as well,
> placing it into read-only memory which can not be modified at runtime.
>
>
Applied, thanks!
[1/1] nvmem: make nvmem_bus_type constant
commit: 40ae493d572497956b275f755dc80ee3b87a1559
Best regards,
--
Srinivas Kandagatla <srini@kernel.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2025-07-11 16:38 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-01 12:02 [PATCH] nvmem: make nvmem_bus_type constant Greg Kroah-Hartman
2025-07-11 16:38 ` Srinivas Kandagatla
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox