Commit f732ba4a authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman Committed by David S. Miller

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 <wenjia@linux.ibm.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Jakub Kicinski <kuba@kernel.org>
Cc: Paolo Abeni <pabeni@redhat.com>
Cc: linux-s390@vger.kernel.org
Cc: netdev@vger.kernel.org
Acked-by: default avatarAlexandra Winter <wintera@linux.ibm.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1271ca00
...@@ -80,7 +80,7 @@ struct iucv_array { ...@@ -80,7 +80,7 @@ struct iucv_array {
u32 length; u32 length;
} __attribute__ ((aligned (8))); } __attribute__ ((aligned (8)));
extern struct bus_type iucv_bus; extern const struct bus_type iucv_bus;
extern struct device *iucv_root; extern struct device *iucv_root;
/* /*
...@@ -489,7 +489,7 @@ struct iucv_interface { ...@@ -489,7 +489,7 @@ struct iucv_interface {
int (*path_sever)(struct iucv_path *path, u8 userdata[16]); int (*path_sever)(struct iucv_path *path, u8 userdata[16]);
int (*iucv_register)(struct iucv_handler *handler, int smp); int (*iucv_register)(struct iucv_handler *handler, int smp);
void (*iucv_unregister)(struct iucv_handler *handler, int smp); void (*iucv_unregister)(struct iucv_handler *handler, int smp);
struct bus_type *bus; const struct bus_type *bus;
struct device *root; struct device *root;
}; };
......
...@@ -67,7 +67,7 @@ static int iucv_bus_match(struct device *dev, struct device_driver *drv) ...@@ -67,7 +67,7 @@ static int iucv_bus_match(struct device *dev, struct device_driver *drv)
return 0; return 0;
} }
struct bus_type iucv_bus = { const struct bus_type iucv_bus = {
.name = "iucv", .name = "iucv",
.match = iucv_bus_match, .match = iucv_bus_match,
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment