]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
power: supply: ds2781: constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 2 Dec 2024 19:02:21 +0000 (20:02 +0100)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 4 Dec 2024 21:19:13 +0000 (22:19 +0100)
commit8159fcb12862f826a26964d8b814ad33e69ba4de
treeab9376f11e57e3f683950c30d73c95e2d83399d9
parent9aae72fe40f06872ae20c0cdb545ea5ecc840842
power: supply: ds2781: constify 'struct bin_attribute'

The sysfs core now allows instances of 'struct bin_attribute' to be
moved into read-only memory. Make use of that to protect them against
accidental or malicious modifications.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Link: https://lore.kernel.org/r/20241202-sysfs-const-bin_attr-psy-v1-3-f846430b8b66@weissschuh.net
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
drivers/power/supply/ds2781_battery.c