summaryrefslogtreecommitdiff
path: root/drivers/acpi
diff options
context:
space:
mode:
authorNathan Chancellor <nathan@kernel.org>2021-06-22 18:38:02 -0700
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2021-06-23 19:27:50 +0200
commit6554ca9cc8c7502895f9c20b3e5e9d81c5edc986 (patch)
tree9fb7f7d5548568e76cc43d30d7ef68dd6dbddf33 /drivers/acpi
parentf37ccf8fce155d08ae2a4fb3db677911ced0c21a (diff)
ACPI: bgrt: Use sysfs_emit
sysfs_emit is preferred to snprintf for emitting values after commit 2efc459d06f1 ("sysfs: Add sysfs_emit and sysfs_emit_at to format sysfs output"). Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reviewed-by: Kees Cook <keescook@chromium.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi')
-rw-r--r--drivers/acpi/bgrt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/acpi/bgrt.c b/drivers/acpi/bgrt.c
index e0d14017706e..02d208732f9a 100644
--- a/drivers/acpi/bgrt.c
+++ b/drivers/acpi/bgrt.c
@@ -19,7 +19,7 @@ static struct kobject *bgrt_kobj;
static ssize_t _name##_show(struct kobject *kobj, \
struct kobj_attribute *attr, char *buf) \
{ \
- return snprintf(buf, PAGE_SIZE, "%d\n", bgrt_tab._member); \
+ return sysfs_emit(buf, "%d\n", bgrt_tab._member); \
} \
struct kobj_attribute bgrt_attr_##_name = __ATTR_RO(_name)