Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

+1 -1
+1 -1
include/linux/device.h
··· 566 566 const char *init_name; /* initial name of the device */ 567 567 const struct device_type *type; 568 568 569 - struct bus_type *bus; /* type of bus device is on */ 569 + const struct bus_type *bus; /* type of bus device is on */ 570 570 struct device_driver *driver; /* which driver has allocated this 571 571 device */ 572 572 void *platform_data; /* Platform specific data, device