Skip to content

Commit f732ba4

Browse files
gregkhdavem330
authored andcommitted
iucv: make iucv_bus const
Now that the driver core can properly handle constant struct bus_type, move the iucv_bus variable to be a constant structure as well, placing it into read-only memory which can not be modified at runtime. Cc: Wenjia Zhang <[email protected]> Cc: "David S. Miller" <[email protected]> Cc: Eric Dumazet <[email protected]> Cc: Jakub Kicinski <[email protected]> Cc: Paolo Abeni <[email protected]> Cc: [email protected] Cc: [email protected] Acked-by: Alexandra Winter <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 1271ca0 commit f732ba4

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

include/net/iucv/iucv.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ struct iucv_array {
8080
u32 length;
8181
} __attribute__ ((aligned (8)));
8282

83-
extern struct bus_type iucv_bus;
83+
extern const struct bus_type iucv_bus;
8484
extern struct device *iucv_root;
8585

8686
/*
@@ -489,7 +489,7 @@ struct iucv_interface {
489489
int (*path_sever)(struct iucv_path *path, u8 userdata[16]);
490490
int (*iucv_register)(struct iucv_handler *handler, int smp);
491491
void (*iucv_unregister)(struct iucv_handler *handler, int smp);
492-
struct bus_type *bus;
492+
const struct bus_type *bus;
493493
struct device *root;
494494
};
495495

net/iucv/iucv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static int iucv_bus_match(struct device *dev, struct device_driver *drv)
6767
return 0;
6868
}
6969

70-
struct bus_type iucv_bus = {
70+
const struct bus_type iucv_bus = {
7171
.name = "iucv",
7272
.match = iucv_bus_match,
7373
};

0 commit comments

Comments
 (0)