]> Git Repo - linux.git/commitdiff
driver core: device.h: make struct bus_type a const *
authorGreg Kroah-Hartman <[email protected]>
Mon, 13 Mar 2023 18:29:17 +0000 (19:29 +0100)
committerGreg Kroah-Hartman <[email protected]>
Thu, 23 Mar 2023 12:21:58 +0000 (13:21 +0100)
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" <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
include/linux/device.h

index 862397ae520d741f3bc92c689613d61ff5aa9081..3b23772d3bbba0ff5d7129491a794eae80bef961 100644 (file)
@@ -566,7 +566,7 @@ struct device {
        const char              *init_name; /* initial name of the device */
        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
                                           device */
        void            *platform_data; /* Platform specific data, device
This page took 0.045083 seconds and 4 git commands to generate.