summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen/usbtouchscreen.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/usbtouchscreen.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/usbtouchscreen.c')
-rw-r--r--drivers/input/touchscreen/usbtouchscreen.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/input/touchscreen/usbtouchscreen.c b/drivers/input/touchscreen/usbtouchscreen.c
index d6d04b9f04fc..60354ebc7242 100644
--- a/drivers/input/touchscreen/usbtouchscreen.c
+++ b/drivers/input/touchscreen/usbtouchscreen.c
@@ -456,8 +456,8 @@ static ssize_t mtouch_firmware_rev_show(struct device *dev,
struct usbtouch_usb *usbtouch = usb_get_intfdata(intf);
struct mtouch_priv *priv = usbtouch->priv;
- return scnprintf(output, PAGE_SIZE, "%1x.%1x\n",
- priv->fw_rev_major, priv->fw_rev_minor);
+ return sysfs_emit(output, "%1x.%1x\n",
+ priv->fw_rev_major, priv->fw_rev_minor);
}
static DEVICE_ATTR(firmware_rev, 0444, mtouch_firmware_rev_show, NULL);