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

driver core: make the bus_type in struct device_driver constant

The pointer to struct bus_type in struct device_driver should only be
pointing to something that can never change now that the driver core has
fixed up the previously writable fields.  So mark it as a constant
pointer to enforce this and move forward with the goal of moving
bus_type into read-only memory.

Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Link: https://lore.kernel.org/r/20230313182918.1312597-28-gregkh@linuxfoundation.orgSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 38370c4e
......@@ -95,7 +95,7 @@ enum probe_type {
*/
struct device_driver {
const char *name;
struct bus_type *bus;
const struct bus_type *bus;
struct module *owner;
const char *mod_name; /* used for built-in modules */
......
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