aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/perf/scripts/python/export-to-postgresql.py
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-12-10 22:55:54 +0100
committerSebastian Reichel <sebastian.reichel@collabora.com>2024-12-11 02:00:24 +0100
commitf52204036326bd9c07db08bab6607f423c801716 (patch)
treec2f6c60a26fffe2e961e7e43aa90a2592275bbcf /tools/perf/scripts/python/export-to-postgresql.py
parentpower: supply: core: remove power_supply_for_each_device() (diff)
downloadwireguard-linux-f52204036326bd9c07db08bab6607f423c801716.tar.xz
wireguard-linux-f52204036326bd9c07db08bab6607f423c801716.zip
power: supply: core: introduce dev_to_psy()
The psy core and drivers currently use dev_get_drvdata() to go from a 'struct device' to its 'struct power_supply'. This is not typesafe and or documented. Introduce a new helper to make this pattern explicit. Instead of using dev_get_drvdata(), use container_of_const() which also preserves the constness. Furthermore 'dev' does need to be dereferenced anymore and at some point the drvdata could be reused for something else. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241210-power-supply-dev_to_psy-v2-7-9d8c9d24cfe4@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions