diff options
author | Rikard Falkeborn <rikard.falkeborn@gmail.com> | 2021-01-09 00:09:19 +0100 |
---|---|---|
committer | Mika Westerberg <mika.westerberg@linux.intel.com> | 2021-01-11 15:13:48 +0100 |
commit | 6889e00f0e138beeb775e38decf59959b079ae6f (patch) | |
tree | 0ba8e91f38f0bb2bd9f7f67c6a4d649ebbb0f705 /drivers/thunderbolt/switch.c | |
parent | thunderbolt: Use kmemdup instead of kzalloc and memcpy (diff) | |
download | linux-6889e00f0e138beeb775e38decf59959b079ae6f.tar.xz linux-6889e00f0e138beeb775e38decf59959b079ae6f.zip |
thunderbolt: Constify static attribute_group structs
The only usage of these is to put their addresses in arrays of pointers
to const attribute_groups. Make them const to allow the compiler to put
them in read-only memory.
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Diffstat (limited to 'drivers/thunderbolt/switch.c')
-rw-r--r-- | drivers/thunderbolt/switch.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/thunderbolt/switch.c b/drivers/thunderbolt/switch.c index a8572f49d3ad..602e1835bf61 100644 --- a/drivers/thunderbolt/switch.c +++ b/drivers/thunderbolt/switch.c @@ -1771,7 +1771,7 @@ static umode_t switch_attr_is_visible(struct kobject *kobj, return sw->safe_mode ? 0 : attr->mode; } -static struct attribute_group switch_group = { +static const struct attribute_group switch_group = { .is_visible = switch_attr_is_visible, .attrs = switch_attrs, }; |