mirror of
https://github.com/nxp-imx/linux-imx.git
synced 2025-12-19 08:58:29 +01:00
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>
This commit is contained in:
parent
32f78abe59
commit
dedb868994
|
|
@ -24,7 +24,7 @@ static int container_offline(struct device *dev)
|
||||||
return cdev->offline ? cdev->offline(cdev) : 0;
|
return cdev->offline ? cdev->offline(cdev) : 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct bus_type container_subsys = {
|
const struct bus_type container_subsys = {
|
||||||
.name = CONTAINER_BUS_NAME,
|
.name = CONTAINER_BUS_NAME,
|
||||||
.dev_name = CONTAINER_BUS_NAME,
|
.dev_name = CONTAINER_BUS_NAME,
|
||||||
.online = trivial_online,
|
.online = trivial_online,
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@
|
||||||
#include <linux/device.h>
|
#include <linux/device.h>
|
||||||
|
|
||||||
/* drivers/base/power/container.c */
|
/* drivers/base/power/container.c */
|
||||||
extern struct bus_type container_subsys;
|
extern const struct bus_type container_subsys;
|
||||||
|
|
||||||
struct container_dev {
|
struct container_dev {
|
||||||
struct device dev;
|
struct device dev;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user