* [PATCH v2] HID: hid-picolcd_core: convert sysfs snprintf to sysfs_emit
@ 2022-08-31 13:12 Xuezhi Zhang
0 siblings, 0 replies; only message in thread
From: Xuezhi Zhang @ 2022-08-31 13:12 UTC (permalink / raw)
To: bonbons, jikos, benjamin.tissoires
Cc: linux-input, linux-kernel, zhangxuezhi1
From: Xuezhi Zhang <zhangxuezhi1@coolpad.com>
Fix up all sysfs show entries to use sysfs_emit
Signed-off-by: Xuezhi Zhang <zhangxuezhi1@coolpad.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
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2022-08-31 13:12 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-31 13:12 [PATCH v2] HID: hid-picolcd_core: convert sysfs snprintf to sysfs_emit Xuezhi Zhang
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).