diff options
author | Ricardo B. Marliere <ricardo@marliere.net> | 2024-02-13 11:49:24 -0300 |
---|---|---|
committer | Thomas Bogendoerfer <tsbogend@alpha.franken.de> | 2024-02-20 13:36:34 +0100 |
commit | eac95d5ae4f872201f6da274af1cd372970af521 (patch) | |
tree | 0ff67fecdb1c93084420d489c7dd7a95079aaf27 /drivers/bus/mips_cdmm.c | |
parent | aaf2230036b709f979caccfbaa7a8bf671c22124 (diff) | |
download | lwn-eac95d5ae4f872201f6da274af1cd372970af521.tar.gz lwn-eac95d5ae4f872201f6da274af1cd372970af521.zip |
mips: bus: make mips_cdmm_bustype const
Now that the driver core can properly handle constant struct bus_type,
move the mips_cdmm_bustype 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: Ricardo B. Marliere <ricardo@marliere.net>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Tested-by: Serge Semin <fancer.lancer@gmail.com>
Acked-by: Serge Semin <fancer.lancer@gmail.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
Diffstat (limited to 'drivers/bus/mips_cdmm.c')
-rw-r--r-- | drivers/bus/mips_cdmm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/bus/mips_cdmm.c b/drivers/bus/mips_cdmm.c index 554e1992edd4..8baf14bd5eff 100644 --- a/drivers/bus/mips_cdmm.c +++ b/drivers/bus/mips_cdmm.c @@ -118,7 +118,7 @@ static struct attribute *mips_cdmm_dev_attrs[] = { }; ATTRIBUTE_GROUPS(mips_cdmm_dev); -struct bus_type mips_cdmm_bustype = { +const struct bus_type mips_cdmm_bustype = { .name = "cdmm", .dev_groups = mips_cdmm_dev_groups, .match = mips_cdmm_match, |