power: supply: ltc4162-l: Constify static struct attribute_group
authorRikard Falkeborn <rikard.falkeborn@gmail.com>
Wed, 13 Jan 2021 20:32:42 +0000 (21:32 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 13 Jan 2021 21:11:43 +0000 (22:11 +0100)
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>
drivers/power/supply/ltc4162-l-charger.c

index cded6484febb60576fca0d8fe19ea316e90c6f05..1a5cb4405ee3ca76e29a4e316473309cf2200071 100644 (file)
@@ -666,7 +666,7 @@ static struct attribute *ltc4162l_sysfs_entries[] = {
        NULL,
 };
 
-static struct attribute_group ltc4162l_attr_group = {
+static const struct attribute_group ltc4162l_attr_group = {
        .name   = NULL, /* put in device directory */
        .attrs  = ltc4162l_sysfs_entries,
 };