Skip to content

Commit 85a19e2

Browse files
rbmarlieregeertu
authored andcommitted
zorro: Make zorro_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 zorro_bus_type variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Suggested-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: Ricardo B. Marliere <[email protected]> Reviewed-by: Geert Uytterhoeven <[email protected]> Reviewed-by: Greg Kroah-Hartman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 6613476 commit 85a19e2

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

drivers/zorro/zorro-driver.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ static int zorro_uevent(const struct device *dev, struct kobj_uevent_env *env)
150150
return 0;
151151
}
152152

153-
struct bus_type zorro_bus_type = {
153+
const struct bus_type zorro_bus_type = {
154154
.name = "zorro",
155155
.dev_name = "zorro",
156156
.dev_groups = zorro_device_attribute_groups,

drivers/zorro/zorro.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
* Zorro bus
55
*/
66

7-
extern struct bus_type zorro_bus_type;
7+
extern const struct bus_type zorro_bus_type;
88

99

1010
#ifdef CONFIG_ZORRO_NAMES

0 commit comments

Comments
 (0)