Commit e374ae2b authored by Ricardo B. Marliere's avatar Ricardo B. Marliere Committed by Andrew Morton

memory tier: make memory_tier_subsys const

Now that the driver core can properly handle constant struct bus_type,
move the memory_tier_subsys variable to be a constant structure as well,
placing it into read-only memory which can not be modified at runtime.

Link: https://lkml.kernel.org/r/20240204-bus_cleanup-mm-v1-1-00f49286f164@marliere.netSigned-off-by: default avatarRicardo B. Marliere <ricardo@marliere.net>
Suggested-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Reviewed-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
parent 98141718
...@@ -39,7 +39,7 @@ static LIST_HEAD(memory_tiers); ...@@ -39,7 +39,7 @@ static LIST_HEAD(memory_tiers);
static struct node_memory_type_map node_memory_types[MAX_NUMNODES]; static struct node_memory_type_map node_memory_types[MAX_NUMNODES];
struct memory_dev_type *default_dram_type; struct memory_dev_type *default_dram_type;
static struct bus_type memory_tier_subsys = { static const struct bus_type memory_tier_subsys = {
.name = "memory_tiering", .name = "memory_tiering",
.dev_name = "memory_tier", .dev_name = "memory_tier",
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment