diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-11-11 22:40:08 +0100 |
---|---|---|
committer | Sebastian Reichel <sebastian.reichel@collabora.com> | 2024-12-05 00:02:31 +0100 |
commit | f29a749d01dc136ee6e08afafebbccc389ef5b05 (patch) | |
tree | be54a0c6c4f708510e2f0511a856144f70e781ef /tools/perf/scripts/python/call-graph-from-postgresql.py | |
parent | 5c2141f2c7c671e8696e2ee1c7b332c77266dd08 (diff) |
power: supply: sysfs: rework uevent property loop
Instead of looping through all properties known to be supported by the
psy, loop over all known properties and decide based on the return value
of power_supply_get_property() whether the property existed.
This makes the code shorter now and even more so when power supply
extensions are added.
It also simplifies the locking, as it can all happen inside
power_supply_get_property().
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Armin Wolf <W_Armin@gmx.de>
Link: https://lore.kernel.org/r/20241111-power-supply-extensions-v4-6-7240144daa8e@weissschuh.net
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'tools/perf/scripts/python/call-graph-from-postgresql.py')
0 files changed, 0 insertions, 0 deletions