summaryrefslogtreecommitdiff
path: root/include/linux/container.h
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-19 16:03:20 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-12-21 13:56:10 +0100
commitdedb868994d8308c6c4650203e190ec619005806 (patch)
tree8efdcaeec6901e2275cc02859e786bd59b79a101 /include/linux/container.h
parent32f78abe59c740b6ec34c89dc10a09208eae7e1f (diff)
driver core: container: make container_subsys const
Now that the driver core can properly handle constant struct bus_type, move the container_subsys variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: "Rafael J. Wysocki" <rafael@kernel.org> Link: https://lore.kernel.org/r/2023121919-chatter-grumbling-9ef3@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/container.h')
-rw-r--r--include/linux/container.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/container.h b/include/linux/container.h
index 2566a1baa736..dd00cc918a92 100644
--- a/include/linux/container.h
+++ b/include/linux/container.h
@@ -12,7 +12,7 @@
#include <linux/device.h>
/* drivers/base/power/container.c */
-extern struct bus_type container_subsys;
+extern const struct bus_type container_subsys;
struct container_dev {
struct device dev;