]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
driver core: make struct class groups members constant arrays
authorHeiner Kallweit <hkallweit1@gmail.com>
Sun, 1 Mar 2026 12:31:56 +0000 (13:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 13 Mar 2026 09:21:31 +0000 (10:21 +0100)
Constify the groups arrays, allowing to assign constant arrays.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/7ff56b07-09ca-4948-b98f-5bd37ceef21e@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/device/class.h

index 65880e60c720834f5a9cf102a93274e03300ce6c..2079239a5aa5ba2eff7d7ba8960f5c3b23258d8d 100644 (file)
@@ -50,8 +50,8 @@ struct fwnode_handle;
 struct class {
        const char              *name;
 
-       const struct attribute_group    **class_groups;
-       const struct attribute_group    **dev_groups;
+       const struct attribute_group    *const *class_groups;
+       const struct attribute_group    *const *dev_groups;
 
        int (*dev_uevent)(const struct device *dev, struct kobj_uevent_env *env);
        char *(*devnode)(const struct device *dev, umode_t *mode);