power: supply: core: ease special formatting implementations
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 3 Mar 2024 15:31:14 +0000 (16:31 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Tue, 5 Mar 2024 23:37:36 +0000 (00:37 +0100)
commit521d75b4174e9cbfad73e7d0ac34fd6461b542d7
tree06cf77bb07b7615d3281ddf2eb50889d1d1a623f
parentcd38a0acca734a1117663d6f0da579d3965b6c93
power: supply: core: ease special formatting implementations

By moving the conditional into the default-branch of the switch new
additions to the switch won't have to bypass the conditional.

This makes it easier to implement those special cases like the upcoming
change to the formatting of "charge_behaviour".

Suggested-by: Hans de Goede <hdegoede@redhat.com>
Link: https://lore.kernel.org/lkml/53082075-852f-4698-b354-ed30e7fd2683@redhat.com/
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20240303-power_supply-charge_behaviour_prop-v2-2-8ebb0a7c2409@weissschuh.net
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_sysfs.c