diff options
| author | Heiner Kallweit <hkallweit1@gmail.com> | 2026-03-01 15:31:02 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2026-03-13 12:21:31 +0300 |
| commit | ece5283706aff6791a37894bafbb0c134a94c0f3 (patch) | |
| tree | eec2d5626c3569dc20ac3467799530a134b3def7 /include/linux/device.h | |
| parent | fe2511adb1fc1814df06ca11e0d8a92f792e4029 (diff) | |
| download | linux-ece5283706aff6791a37894bafbb0c134a94c0f3.tar.xz | |
driver: core: constify groups array argument in device_add_groups and device_remove_groups
Now that sysfs_create_groups() and sysfs_remove_groups() allow to
pass constant groups arrays, we can constify the groups array argument
also here.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://patch.msgid.link/8ea2d6d1-0adb-4d7f-92bc-751e93ce08d6@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/device.h')
| -rw-r--r-- | include/linux/device.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index 0be95294b6e6..48a0444ccc1e 100644 --- a/include/linux/device.h +++ b/include/linux/device.h @@ -1131,9 +1131,9 @@ device_create_with_groups(const struct class *cls, struct device *parent, dev_t void device_destroy(const struct class *cls, dev_t devt); int __must_check device_add_groups(struct device *dev, - const struct attribute_group **groups); + const struct attribute_group *const *groups); void device_remove_groups(struct device *dev, - const struct attribute_group **groups); + const struct attribute_group *const *groups); static inline int __must_check device_add_group(struct device *dev, const struct attribute_group *grp) |
