Skip to content

Commit e687b81

Browse files
t-8chrafaeljw
authored andcommitted
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 <[email protected]> Link: https://patch.msgid.link/20241202-sysfs-const-bin_attr-acpi-v1-1-78f3b38d350d@weissschuh.net Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent fac04ef commit e687b81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/acpi/bgrt.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ BGRT_SHOW(type, image_type);
2929
BGRT_SHOW(xoffset, image_offset_x);
3030
BGRT_SHOW(yoffset, image_offset_y);
3131

32-
static BIN_ATTR_SIMPLE_RO(image);
32+
static __ro_after_init BIN_ATTR_SIMPLE_RO(image);
3333

3434
static struct attribute *bgrt_attributes[] = {
3535
&bgrt_attr_version.attr,

0 commit comments

Comments
 (0)