Commit d16d7e91 authored by Thomas Weißschuh's avatar Thomas Weißschuh Committed by Rafael J. Wysocki
Browse files

ACPI: BGRT: 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: default avatarThomas Weißschuh <linux@weissschuh.net>
Link: https://patch.msgid.link/20241202-sysfs-const-bin_attr-acpi-v1-2-78f3b38d350d@weissschuh.net


Signed-off-by: default avatarRafael J. Wysocki <rafael.j.wysocki@intel.com>
parent e687b81f
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -40,14 +40,14 @@ static struct attribute *bgrt_attributes[] = {
	NULL,
};

static struct bin_attribute *bgrt_bin_attributes[] = {
static const struct bin_attribute *const bgrt_bin_attributes[] = {
	&bin_attr_image,
	NULL,
};

static const struct attribute_group bgrt_attribute_group = {
	.attrs = bgrt_attributes,
	.bin_attrs = bgrt_bin_attributes,
	.bin_attrs_new = bgrt_bin_attributes,
};

int __init acpi_parse_bgrt(struct acpi_table_header *table)