Skip to content

Commit

Permalink
ACPI: bgrt: Use sysfs_emit
Browse files Browse the repository at this point in the history
sysfs_emit is preferred to snprintf for emitting values after
commit 2efc459 ("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>
  • Loading branch information
Nathan Chancellor authored and Rafael J. Wysocki committed Jun 23, 2021
1 parent f37ccf8 commit 6554ca9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/acpi/bgrt.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down

0 comments on commit 6554ca9

Please sign in to comment.