Skip to content

Commit f554b68

Browse files
KunWuChangregkh
authored andcommitted
ARM: riscpc: make ecard_bus_type constant
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 ecard_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]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 51796f5 commit f554b68

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

arch/arm/include/asm/ecard.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ void __iomem *ecardm_iomap(struct expansion_card *ec, unsigned int res,
195195
unsigned long offset, unsigned long maxsize);
196196
#define ecardm_iounmap(__ec, __addr) devm_iounmap(&(__ec)->dev, __addr)
197197

198-
extern struct bus_type ecard_bus_type;
198+
extern const struct bus_type ecard_bus_type;
199199

200200
#define ECARD_DEV(_d) container_of((_d), struct expansion_card, dev)
201201

arch/arm/mach-rpc/ecard.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ static int ecard_match(struct device *_dev, const struct device_driver *_drv)
11241124
return ret;
11251125
}
11261126

1127-
struct bus_type ecard_bus_type = {
1127+
const struct bus_type ecard_bus_type = {
11281128
.name = "ecard",
11291129
.dev_groups = ecard_dev_groups,
11301130
.match = ecard_match,

0 commit comments

Comments
 (0)