From: Thomas Weißschuh Date: Wed, 5 Jan 2022 06:42:38 +0000 (+0100) Subject: power: supply: fix charge_behaviour attribute initialization X-Git-Tag: v5.17-rc1~150^2~17 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c8e2d921aa968bacc869a0e07baac2ff66a5d6c6;p=thirdparty%2Fkernel%2Flinux.git power: supply: fix charge_behaviour attribute initialization All properties have to be added to power_supply_attrs which was missed before. Fixes: 1b0b6cc8030d ("power: supply: add charge_behaviour attributes") Reported-by: Heiner Kallweit Suggested-by: Heiner Kallweit Signed-off-by: Thomas Weißschuh Link: https://lore.kernel.org/r/20220105064239.2689-1-linux@weissschuh.net Signed-off-by: Hans de Goede --- diff --git a/drivers/power/supply/power_supply_sysfs.c b/drivers/power/supply/power_supply_sysfs.c index 5e3b8c15ddbe6..491ffec7bf47d 100644 --- a/drivers/power/supply/power_supply_sysfs.c +++ b/drivers/power/supply/power_supply_sysfs.c @@ -178,6 +178,7 @@ static struct power_supply_attr power_supply_attrs[] = { POWER_SUPPLY_ATTR(CHARGE_CONTROL_LIMIT_MAX), POWER_SUPPLY_ATTR(CHARGE_CONTROL_START_THRESHOLD), POWER_SUPPLY_ATTR(CHARGE_CONTROL_END_THRESHOLD), + POWER_SUPPLY_ENUM_ATTR(CHARGE_BEHAVIOUR), POWER_SUPPLY_ATTR(INPUT_CURRENT_LIMIT), POWER_SUPPLY_ATTR(INPUT_VOLTAGE_LIMIT), POWER_SUPPLY_ATTR(INPUT_POWER_LIMIT),