]> www.infradead.org Git - users/jedix/linux-maple.git/commit
nvmem: core: constify 'struct bin_attribute'
authorThomas Weißschuh <linux@weissschuh.net>
Mon, 30 Dec 2024 14:30:25 +0000 (14:30 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 30 Dec 2024 14:35:59 +0000 (15:35 +0100)
commit78dc14daf481a26b4da0e1ed7d9e1eb9112a0ba7
treea38c40fcd3f660a9b3b503146d7535d6a17d33ce
parent90154d08675fdac580b24d90a8716987d4ef4071
nvmem: core: 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.

Also adapt the dynamic sysfs cell logic to handle the const attributes.

Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org>
Link: https://lore.kernel.org/r/20241230143035.265518-2-srinivas.kandagatla@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/nvmem/core.c