Skip to content

Commit eac95d5

Browse files
rbmarlieretsbogend
authored andcommitted
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 <[email protected]> Suggested-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Ricardo B. Marliere <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Tested-by: Serge Semin <[email protected]> Acked-by: Serge Semin <[email protected]> Signed-off-by: Thomas Bogendoerfer <[email protected]>
1 parent aaf2230 commit eac95d5

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/mips/include/asm/cdmm.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ struct mips_cdmm_driver {
6363
*/
6464
phys_addr_t mips_cdmm_phys_base(void);
6565

66-
extern struct bus_type mips_cdmm_bustype;
66+
extern const struct bus_type mips_cdmm_bustype;
6767
void __iomem *mips_cdmm_early_probe(unsigned int dev_type);
6868

6969
#define to_mips_cdmm_device(d) container_of(d, struct mips_cdmm_device, dev)

drivers/bus/mips_cdmm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static struct attribute *mips_cdmm_dev_attrs[] = {
118118
};
119119
ATTRIBUTE_GROUPS(mips_cdmm_dev);
120120

121-
struct bus_type mips_cdmm_bustype = {
121+
const struct bus_type mips_cdmm_bustype = {
122122
.name = "cdmm",
123123
.dev_groups = mips_cdmm_dev_groups,
124124
.match = mips_cdmm_match,

0 commit comments

Comments
 (0)