From: Thomas Weißschuh Date: Mon, 2 Dec 2024 19:04:09 +0000 (+0100) Subject: ACPI: BGRT: Mark bin_attribute as __ro_after_init X-Git-Tag: v6.14-rc1~147^2^4~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e687b81f4c0e1e1d2cb84716523d7791fa34c8ff;p=thirdparty%2Fkernel%2Flinux.git ACPI: BGRT: Mark bin_attribute as __ro_after_init The attribute is only modified during __init phase. Protect it against accidental or intentional modifications afterwards. Signed-off-by: Thomas Weißschuh Link: https://patch.msgid.link/20241202-sysfs-const-bin_attr-acpi-v1-1-78f3b38d350d@weissschuh.net Signed-off-by: Rafael J. Wysocki --- diff --git a/drivers/acpi/bgrt.c b/drivers/acpi/bgrt.c index d1d9c9289087a..88837c291a763 100644 --- a/drivers/acpi/bgrt.c +++ b/drivers/acpi/bgrt.c @@ -29,7 +29,7 @@ BGRT_SHOW(type, image_type); BGRT_SHOW(xoffset, image_offset_x); BGRT_SHOW(yoffset, image_offset_y); -static BIN_ATTR_SIMPLE_RO(image); +static __ro_after_init BIN_ATTR_SIMPLE_RO(image); static struct attribute *bgrt_attributes[] = { &bgrt_attr_version.attr,