Skip to content

Commit d492cc2

Browse files
committed
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 parent b18d0a0 commit d492cc2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

include/linux/device.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ struct device {
566566
const char *init_name; /* initial name of the device */
567567
const struct device_type *type;
568568

569-
struct bus_type *bus; /* type of bus device is on */
569+
const struct bus_type *bus; /* type of bus device is on */
570570
struct device_driver *driver; /* which driver has allocated this
571571
device */
572572
void *platform_data; /* Platform specific data, device

0 commit comments

Comments
 (0)