]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
driver core: make struct bus_type groups members constant arrays
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 16 Mar 2026 22:10:31 +0000 (23:10 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 22 May 2026 11:32:05 +0000 (13:32 +0200)
Constify the groups arrays, allowing to assign constant arrays.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/265f6584-8edd-48a0-9568-a9d584b9ec3a@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/device/bus.h

index c1b463cd6464d8df20e230071f41b690976becc1..a38f7229b8f4d067787d37967adc6408f76f72e0 100644 (file)
@@ -83,9 +83,9 @@ struct fwnode_handle;
 struct bus_type {
        const char              *name;
        const char              *dev_name;
-       const struct attribute_group **bus_groups;
-       const struct attribute_group **dev_groups;
-       const struct attribute_group **drv_groups;
+       const struct attribute_group *const *bus_groups;
+       const struct attribute_group *const *dev_groups;
+       const struct attribute_group *const *drv_groups;
 
        int (*match)(struct device *dev, const struct device_driver *drv);
        int (*uevent)(const struct device *dev, struct kobj_uevent_env *env);