Skip to content

Commit 8ab0f46

Browse files
KunWuChangregkh
authored andcommitted
bus: fsl-mc: make fsl_mc_bus_type const
Since commit d492cc2 ("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 <[email protected]> Suggested-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Kunwu Chan <[email protected]> Acked-by: Christophe Leroy <[email protected]> # for Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent ba82e10 commit 8ab0f46

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/bus/fsl-mc/fsl-mc-bus.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ static struct attribute *fsl_mc_bus_attrs[] = {
309309

310310
ATTRIBUTE_GROUPS(fsl_mc_bus);
311311

312-
struct bus_type fsl_mc_bus_type = {
312+
const struct bus_type fsl_mc_bus_type = {
313313
.name = "fsl-mc",
314314
.match = fsl_mc_bus_match,
315315
.uevent = fsl_mc_bus_uevent,

include/linux/fsl/mc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -436,7 +436,7 @@ void fsl_mc_free_irqs(struct fsl_mc_device *mc_dev);
436436
struct fsl_mc_device *fsl_mc_get_endpoint(struct fsl_mc_device *mc_dev,
437437
u16 if_id);
438438

439-
extern struct bus_type fsl_mc_bus_type;
439+
extern const struct bus_type fsl_mc_bus_type;
440440

441441
extern struct device_type fsl_mc_bus_dprc_type;
442442
extern struct device_type fsl_mc_bus_dpni_type;

0 commit comments

Comments
 (0)