summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/hycon-hy46xx.c
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2023-12-12 21:53:40 -0800
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2023-12-13 21:26:11 -0800
commite50389f208daf1d60810e789b8860063e3256693 (patch)
treeb0dc8c053542e51c53f34c4289375ac207ff88be /drivers/input/touchscreen/hycon-hy46xx.c
parent1864a2006ee1e41960b63ca63aa79fabb690e71b (diff)
Input: touchscreen - use sysfs_emit[_at]() instead of scnprintf()
Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Acked-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Oliver Graute <oliver.graute@kococonnector.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'drivers/input/touchscreen/hycon-hy46xx.c')
-rw-r--r--drivers/input/touchscreen/hycon-hy46xx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/input/touchscreen/hycon-hy46xx.c b/drivers/input/touchscreen/hycon-hy46xx.c
index d0f257989fd6..2e01d87977c1 100644
--- a/drivers/input/touchscreen/hycon-hy46xx.c
+++ b/drivers/input/touchscreen/hycon-hy46xx.c
@@ -202,7 +202,7 @@ static ssize_t hycon_hy46xx_setting_show(struct device *dev,
*field = val;
}
- count = scnprintf(buf, PAGE_SIZE, "%d\n", val);
+ count = sysfs_emit(buf, "%d\n", val);
out:
mutex_unlock(&tsdata->mutex);