diff options
Diffstat (limited to 'drivers/acpi/bgrt.c')
| -rw-r--r-- | drivers/acpi/bgrt.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/acpi/bgrt.c b/drivers/acpi/bgrt.c index 02d208732f9a..0fdd581ef96f 100644 --- a/drivers/acpi/bgrt.c +++ b/drivers/acpi/bgrt.c @@ -21,7 +21,7 @@ static struct kobject *bgrt_kobj; { \ return sysfs_emit(buf, "%d\n", bgrt_tab._member); \ } \ - struct kobj_attribute bgrt_attr_##_name = __ATTR_RO(_name) + static struct kobj_attribute bgrt_attr_##_name = __ATTR_RO(_name) BGRT_SHOW(version, version); BGRT_SHOW(status, status); @@ -29,14 +29,7 @@ BGRT_SHOW(type, image_type); BGRT_SHOW(xoffset, image_offset_x); BGRT_SHOW(yoffset, image_offset_y); -static ssize_t image_read(struct file *file, struct kobject *kobj, - struct bin_attribute *attr, char *buf, loff_t off, size_t count) -{ - memcpy(buf, attr->private + off, count); - return count; -} - -static BIN_ATTR_RO(image, 0); /* size gets filled in later */ +static __ro_after_init BIN_ATTR_SIMPLE_RO(image); static struct attribute *bgrt_attributes[] = { &bgrt_attr_version.attr, @@ -47,7 +40,7 @@ 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, }; |
