Skip to content

Commit

Permalink
drivers: tty: replace snprintf in show functions with sysfs_emit
Browse files Browse the repository at this point in the history
Reported-by: Zeal Robot <zealci@zte.com.cn>
Signed-off-by: Jing Yao <yao.jing2@zte.com.cn>
  • Loading branch information
Jing Yao authored and intel-lab-lkp committed Oct 28, 2021
1 parent 73a3d4f commit 03b103a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/tty/serial/8250/8250_port.c
Expand Up @@ -3099,7 +3099,7 @@ static ssize_t rx_trig_bytes_show(struct device *dev,
if (rxtrig_bytes < 0)
return rxtrig_bytes;

return snprintf(buf, PAGE_SIZE, "%d\n", rxtrig_bytes);
return sysfs_emit(buf, PAGE_SIZE, "%d\n", rxtrig_bytes);
}

static int do_set_rxtrig(struct tty_port *port, unsigned char bytes)
Expand Down

0 comments on commit 03b103a

Please sign in to comment.