Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

bus: fsl-mc: make fsl_mc_bus_type const

Since commit d492cc2573a0 ("driver core: device.h: make struct
bus_type a const *"), the driver core can properly handle constant
struct bus_type, move the fsl_mc_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: Kunwu Chan <chentao@kylinos.cn>
Acked-by: Christophe Leroy <christophe.leroy@csgroup.eu> # for
Link: https://lore.kernel.org/r/20240823062440.113628-1-kunwu.chan@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Kunwu Chan and committed by
Greg Kroah-Hartman
8ab0f460 ba82e10c

+2 -2
+1 -1
drivers/bus/fsl-mc/fsl-mc-bus.c
··· 309 309 310 310 ATTRIBUTE_GROUPS(fsl_mc_bus); 311 311 312 - struct bus_type fsl_mc_bus_type = { 312 + const struct bus_type fsl_mc_bus_type = { 313 313 .name = "fsl-mc", 314 314 .match = fsl_mc_bus_match, 315 315 .uevent = fsl_mc_bus_uevent,
+1 -1
include/linux/fsl/mc.h
··· 436 436 struct fsl_mc_device *fsl_mc_get_endpoint(struct fsl_mc_device *mc_dev, 437 437 u16 if_id); 438 438 439 - extern struct bus_type fsl_mc_bus_type; 439 + extern const struct bus_type fsl_mc_bus_type; 440 440 441 441 extern struct device_type fsl_mc_bus_dprc_type; 442 442 extern struct device_type fsl_mc_bus_dpni_type;