From: Heiner Kallweit Date: Mon, 16 Mar 2026 22:11:12 +0000 (+0100) Subject: device core: make struct device_driver groups members constant arrays X-Git-Url: http://git.ipfire.org/gitweb/?a=commitdiff_plain;h=a9c12b783cc711de3ac7f188bed07d529bb818af;p=thirdparty%2Fkernel%2Flinux.git device core: make struct device_driver groups members constant arrays Constify the groups arrays, allowing to assign constant arrays. Signed-off-by: Heiner Kallweit Link: https://patch.msgid.link/42624513-923c-4970-834d-036282e24e24@gmail.com Signed-off-by: Greg Kroah-Hartman --- diff --git a/include/linux/device/driver.h b/include/linux/device/driver.h index bbc67ec513edf..c882daaef0128 100644 --- a/include/linux/device/driver.h +++ b/include/linux/device/driver.h @@ -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);