mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-11-27 03:55:37 +08:00
driver core: mark remaining local bus_type variables as const
Now that the driver core can properly handle constant struct bus_type, change the local driver core bus_type variables to be a constant structure as well, placing them into read-only memory which can not be modified at runtime. Cc: Ira Weiny <ira.weiny@intel.com> Cc: Rafael J. Wysocki <rafael@kernel.org> Cc: David Hildenbrand <david@redhat.com> Cc: Oscar Salvador <osalvador@suse.de> Cc: Kevin Hilman <khilman@kernel.org> Cc: Ulf Hansson <ulf.hansson@linaro.org> Cc: Len Brown <len.brown@intel.com> Acked-by: William Breathitt Gray <william.gray@linaro.org> Acked-by: Dave Ertman <david.m.ertman@intel.com> Link: https://lore.kernel.org/r/2023121908-paver-follow-cc21@gregkh Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
dedb868994
commit
580fc9c750
@ -244,7 +244,7 @@ static void auxiliary_bus_shutdown(struct device *dev)
|
||||
auxdrv->shutdown(auxdev);
|
||||
}
|
||||
|
||||
static struct bus_type auxiliary_bus_type = {
|
||||
static const struct bus_type auxiliary_bus_type = {
|
||||
.name = "auxiliary",
|
||||
.probe = auxiliary_bus_probe,
|
||||
.remove = auxiliary_bus_remove,
|
||||
|
@ -82,7 +82,7 @@ static int isa_bus_resume(struct device *dev)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct bus_type isa_bus_type = {
|
||||
static const struct bus_type isa_bus_type = {
|
||||
.name = "isa",
|
||||
.match = isa_bus_match,
|
||||
.probe = isa_bus_probe,
|
||||
|
@ -68,7 +68,7 @@ static inline unsigned long phys_to_block_id(unsigned long phys)
|
||||
static int memory_subsys_online(struct device *dev);
|
||||
static int memory_subsys_offline(struct device *dev);
|
||||
|
||||
static struct bus_type memory_subsys = {
|
||||
static const struct bus_type memory_subsys = {
|
||||
.name = MEMORY_CLASS_NAME,
|
||||
.dev_name = MEMORY_CLASS_NAME,
|
||||
.online = memory_subsys_online,
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include <linux/swap.h>
|
||||
#include <linux/slab.h>
|
||||
|
||||
static struct bus_type node_subsys = {
|
||||
static const struct bus_type node_subsys = {
|
||||
.name = "node",
|
||||
.dev_name = "node",
|
||||
};
|
||||
|
@ -2670,7 +2670,7 @@ static void genpd_release_dev(struct device *dev)
|
||||
kfree(dev);
|
||||
}
|
||||
|
||||
static struct bus_type genpd_bus_type = {
|
||||
static const struct bus_type genpd_bus_type = {
|
||||
.name = "genpd",
|
||||
};
|
||||
|
||||
|
@ -28,7 +28,7 @@ struct soc_device {
|
||||
int soc_dev_num;
|
||||
};
|
||||
|
||||
static struct bus_type soc_bus_type = {
|
||||
static const struct bus_type soc_bus_type = {
|
||||
.name = "soc",
|
||||
};
|
||||
static bool soc_bus_registered;
|
||||
|
Loading…
Reference in New Issue
Block a user