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.

ARM: riscpc: make ecard_bus_type constant

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 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 <gregkh@linuxfoundation.org>
Suggested-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Reviewed-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Link: https://lore.kernel.org/r/20240823081444.150976-1-kunwu.chan@linux.dev
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Kunwu Chan and committed by
Greg Kroah-Hartman
f554b68e 51796f5e

+2 -2
+1 -1
arch/arm/include/asm/ecard.h
··· 195 195 unsigned long offset, unsigned long maxsize); 196 196 #define ecardm_iounmap(__ec, __addr) devm_iounmap(&(__ec)->dev, __addr) 197 197 198 - extern struct bus_type ecard_bus_type; 198 + extern const struct bus_type ecard_bus_type; 199 199 200 200 #define ECARD_DEV(_d) container_of((_d), struct expansion_card, dev) 201 201
+1 -1
arch/arm/mach-rpc/ecard.c
··· 1124 1124 return ret; 1125 1125 } 1126 1126 1127 - struct bus_type ecard_bus_type = { 1127 + const struct bus_type ecard_bus_type = { 1128 1128 .name = "ecard", 1129 1129 .dev_groups = ecard_dev_groups, 1130 1130 .match = ecard_match,