]> www.infradead.org Git - users/jedix/linux-maple.git/commit
hwmon: (occ/p9_sbe) Constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Sun, 15 Dec 2024 15:19:04 +0000 (16:19 +0100)
committerGuenter Roeck <linux@roeck-us.net>
Mon, 16 Dec 2024 06:02:26 +0000 (22:02 -0800)
commit0f049da5b0568cafd39706cc87a1b689dcdae8a0
tree6daa418aea13e28f150df27000d8611d10e6c782
parentcf85760f6a0a656d06d9e2851fc82baf1240262a
hwmon: (occ/p9_sbe) 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/20241215-sysfs-const-bin_attr-hwmon-v1-1-ea72a6a46c36@weissschuh.net
Signed-off-by: Guenter Roeck <linux@roeck-us.net>
drivers/hwmon/occ/p9_sbe.c