drivers/base: Constify static attribute_group structs
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Fri, 28 May 2021 21:34:08 +0000 (23:34 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 4 Jun 2021 13:06:28 +0000 (15:06 +0200)
commit5a576764e4190f7b48cf3cf40f4294f001918605
tree8467e31ccac33478f872e136bfe3757eea9ef670
parent7f787701b2981d1a22f3951612fbb5a97ee658d3
drivers/base: Constify static attribute_group structs

These are only used by putting their address in an array of pointers to
const struct attribute_group (either directly or via the
__ATTRIBUTE_GROUP macro). Make them const to allow the compiler to place
them in read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20210528213408.20067-1-rikard.falkeborn@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/cpu.c
drivers/base/memory.c
drivers/base/node.c
drivers/base/platform.c