diff options
author | Thomas Weißschuh <linux@weissschuh.net> | 2024-12-02 20:04:09 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2024-12-10 19:34:41 +0100 |
commit | e687b81f4c0e1e1d2cb84716523d7791fa34c8ff (patch) | |
tree | d286cbe169eb313190dbd89eb5658b68cf8151e1 /drivers/acpi/bgrt.c | |
parent | Linux 6.13-rc2 (diff) | |
download | linux-e687b81f4c0e1e1d2cb84716523d7791fa34c8ff.tar.xz linux-e687b81f4c0e1e1d2cb84716523d7791fa34c8ff.zip |
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 <linux@weissschuh.net>
Link: https://patch.msgid.link/20241202-sysfs-const-bin_attr-acpi-v1-1-78f3b38d350d@weissschuh.net
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/bgrt.c')
-rw-r--r-- | drivers/acpi/bgrt.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/bgrt.c b/drivers/acpi/bgrt.c index d1d9c9289087..88837c291a76 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, |