From: Heiner Kallweit Date: Sun, 1 Mar 2026 12:31:56 +0000 (+0100) Subject: driver core: make struct class groups members constant arrays X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=10f874dc92b3f3bf96470d997bdf157b289c9d4c;p=thirdparty%2Fkernel%2Flinux.git driver core: make struct class groups members constant arrays Constify the groups arrays, allowing to assign constant arrays. Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/7ff56b07-09ca-4948-b98f-5bd37ceef21e@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/device/class.h b/include/linux/device/class.h index 65880e60c7208..2079239a5aa5b 100644 --- a/include/linux/device/class.h +++ b/include/linux/device/class.h @@ -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);