]> git.ipfire.org Git - thirdparty/linux.git/commit
power: supply: sysfs: Constify pointer passed to dev_attr_psp()
authorKrzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Wed, 26 Nov 2025 17:19:00 +0000 (18:19 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Mon, 12 Jan 2026 01:52:31 +0000 (02:52 +0100)
commit2c7e46e1318d4fbf514f454d5a746a1b76d06ebe
tree9c08d209df47bf0fd8e5dbe49a07fdb7fa6bb2fb
parent688364a11647dc09ba1e4429313e0008066ec790
power: supply: sysfs: Constify pointer passed to dev_attr_psp()

Memory pointer by pointer passed to dev_attr_psp() is not modified, so
with help of container_of_const() (preferred than container_of()) can be
made pointer to const for code safety.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>
Link: https://patch.msgid.link/20251126171859.72465-2-krzysztof.kozlowski@oss.qualcomm.com
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/power_supply_sysfs.c