mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] nvmem: core: make nvmem_bus_type const
@ 2024-02-04 20:22 Ricardo B. Marliere
  2024-02-05 12:48 ` Greg Kroah-Hartman
  0 siblings, 1 reply; 2+ messages in thread
From: Ricardo B. Marliere @ 2024-02-04 20:22 UTC (permalink / raw)
  To: Srinivas Kandagatla; +Cc: linux-kernel, Greg Kroah-Hartman, Ricardo B. Marliere

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ricardo B. Marliere <ricardo@marliere.net>
---
 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 eb357ac2e54a..5236f11d4700 100644
--- a/drivers/nvmem/core.c
+++ b/drivers/nvmem/core.c
@@ -517,7 +517,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",
 };
 

---
base-commit: a0cfd5e997824d0bd8c7620d40cdb324121a2fc7
change-id: 20240204-bus_cleanup-nvmem-a5d83375164b

Best regards,
-- 
Ricardo B. Marliere <ricardo@marliere.net>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-05 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-04 20:22 [PATCH] nvmem: core: make nvmem_bus_type const Ricardo B. Marliere
2024-02-05 12:48 ` Greg Kroah-Hartman

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®