]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
device core: make struct device_driver groups members constant arrays
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 16 Mar 2026 22:11:12 +0000 (23:11 +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/42624513-923c-4970-834d-036282e24e24@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
include/linux/device/driver.h

index bbc67ec513edf689ac6db9343b33df830d48b886..c882daaef012874dcda68144a600683416ecf0be 100644 (file)
@@ -114,8 +114,8 @@ struct device_driver {
        void (*shutdown) (struct device *dev);
        int (*suspend) (struct device *dev, pm_message_t state);
        int (*resume) (struct device *dev);
-       const struct attribute_group **groups;
-       const struct attribute_group **dev_groups;
+       const struct attribute_group *const *groups;
+       const struct attribute_group *const *dev_groups;
 
        const struct dev_pm_ops *pm;
        void (*coredump) (struct device *dev);