Skip to content

Commit be1735d

Browse files
andy-shevdtor
authored andcommitted
Input: elo - switch to use scnprintf() to suppress truncation warning
Switch the driver to use scnprintf() to avoid warnings about potential truncation of "phys" field which we can tolerate. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://patch.msgid.link/20260113082856.83617-1-andriy.shevchenko@linux.intel.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
1 parent 6b88bc3 commit be1735d

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • drivers/input/touchscreen

drivers/input/touchscreen/elo.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ static int elo_connect(struct serio *serio, struct serio_driver *drv)
320320
elo->expected_packet = ELO10_TOUCH_PACKET;
321321
mutex_init(&elo->cmd_mutex);
322322
init_completion(&elo->cmd_done);
323-
snprintf(elo->phys, sizeof(elo->phys), "%s/input0", serio->phys);
323+
scnprintf(elo->phys, sizeof(elo->phys), "%s/input0", serio->phys);
324324

325325
input_dev->name = "Elo Serial TouchScreen";
326326
input_dev->phys = elo->phys;

0 commit comments

Comments
 (0)