[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20220831131228.240026-1-zhangxuezhi3@gmail.com>
Date: Wed, 31 Aug 2022 21:12:28 +0800
From: Xuezhi Zhang <zhangxuezhi3@...il.com>
To: bonbons@...ux-vserver.org, jikos@...nel.org,
benjamin.tissoires@...hat.com
Cc: linux-input@...r.kernel.org, linux-kernel@...r.kernel.org,
zhangxuezhi1@...lpad.com
Subject: [PATCH v2] HID: hid-picolcd_core: convert sysfs snprintf to sysfs_emit
From: Xuezhi Zhang <zhangxuezhi1@...lpad.com>
Fix up all sysfs show entries to use sysfs_emit
Signed-off-by: Xuezhi Zhang <zhangxuezhi1@...lpad.com>
---
v2: fix the From line and Signed-off-by line.
---
drivers/hid/hid-picolcd_core.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/hid/hid-picolcd_core.c b/drivers/hid/hid-picolcd_core.c
index bbda231a7ce3..fa46fb6eab3f 100644
--- a/drivers/hid/hid-picolcd_core.c
+++ b/drivers/hid/hid-picolcd_core.c
@@ -256,9 +256,9 @@ static ssize_t picolcd_operation_mode_show(struct device *dev,
struct picolcd_data *data = dev_get_drvdata(dev);
if (data->status & PICOLCD_BOOTLOADER)
- return snprintf(buf, PAGE_SIZE, "[bootloader] lcd\n");
+ return sysfs_emit(buf, "[bootloader] lcd\n");
else
- return snprintf(buf, PAGE_SIZE, "bootloader [lcd]\n");
+ return sysfs_emit(buf, "bootloader [lcd]\n");
}
static ssize_t picolcd_operation_mode_store(struct device *dev,
@@ -301,7 +301,7 @@ static ssize_t picolcd_operation_mode_delay_show(struct device *dev,
{
struct picolcd_data *data = dev_get_drvdata(dev);
- return snprintf(buf, PAGE_SIZE, "%hu\n", data->opmode_delay);
+ return sysfs_emit(buf, "%hu\n", data->opmode_delay);
}
static ssize_t picolcd_operation_mode_delay_store(struct device *dev,
--
2.25.1
Powered by blists - more mailing lists