diff options
author | ye xingchen <ye.xingchen@zte.com.cn> | 2022-11-30 09:16:08 +0100 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2022-12-02 20:24:55 +0100 |
commit | 92266c65e08793fda74d1d71edfbe25000807f39 (patch) | |
tree | 53f3fa16bef7b9cd1f5ff2f035038fc62908822f /drivers/acpi/acpi_pad.c | |
parent | ACPI: irq: Fix some kernel-doc issues (diff) | |
download | linux-92266c65e08793fda74d1d71edfbe25000807f39.tar.xz linux-92266c65e08793fda74d1d71edfbe25000807f39.zip |
ACPI: use sysfs_emit() instead of scnprintf()
Replace the open-code with sysfs_emit() to simplify the code.
Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'drivers/acpi/acpi_pad.c')
-rw-r--r-- | drivers/acpi/acpi_pad.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/acpi/acpi_pad.c b/drivers/acpi/acpi_pad.c index ec0e22a1e25d..0c305cd6bb42 100644 --- a/drivers/acpi/acpi_pad.c +++ b/drivers/acpi/acpi_pad.c @@ -287,7 +287,7 @@ static ssize_t rrtime_store(struct device *dev, static ssize_t rrtime_show(struct device *dev, struct device_attribute *attr, char *buf) { - return scnprintf(buf, PAGE_SIZE, "%d\n", round_robin_time); + return sysfs_emit(buf, "%d\n", round_robin_time); } static DEVICE_ATTR_RW(rrtime); @@ -309,7 +309,7 @@ static ssize_t idlepct_store(struct device *dev, static ssize_t idlepct_show(struct device *dev, struct device_attribute *attr, char *buf) { - return scnprintf(buf, PAGE_SIZE, "%d\n", idle_pct); + return sysfs_emit(buf, "%d\n", idle_pct); } static DEVICE_ATTR_RW(idlepct); |