Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

power: supply: core: Constify static struct attribute_group

The only usage of it is to put its address in an array of pointers to
const static structs. Make it const to allow the compiler to put it in
read-only memory.

Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>

authored by

Rikard Falkeborn and committed by
Sebastian Reichel
2f7cf24f 249aacc6

+1 -1
+1 -1
drivers/power/supply/power_supply_sysfs.c
··· 374 374 return 0; 375 375 } 376 376 377 - static struct attribute_group power_supply_attr_group = { 377 + static const struct attribute_group power_supply_attr_group = { 378 378 .attrs = __power_supply_attrs, 379 379 .is_visible = power_supply_attr_is_visible, 380 380 };