Commit d492cc25 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

driver core: device.h: make struct bus_type a const *

Now that all users who accessed the bus_type structure in struct device
are properly using it as a const *, mark it as such so that no one can
modify it going forward anymore.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230313182918.1312597-35-gregkh@linuxfoundation.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b18d0a0f
...@@ -566,7 +566,7 @@ struct device { ...@@ -566,7 +566,7 @@ struct device {
const char *init_name; /* initial name of the device */ const char *init_name; /* initial name of the device */
const struct device_type *type; const struct device_type *type;
struct bus_type *bus; /* type of bus device is on */ const struct bus_type *bus; /* type of bus device is on */
struct device_driver *driver; /* which driver has allocated this struct device_driver *driver; /* which driver has allocated this
device */ device */
void *platform_data; /* Platform specific data, device void *platform_data; /* Platform specific data, device
......
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