From: Geert Uytterhoeven Date: Tue, 19 Oct 2021 14:45:04 +0000 (+0200) Subject: auxdisplay: img-ascii-lcd: Convert device attribute to sysfs_emit() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=12a19324ebd9edc08edc0d7ff27a3662e1bb6e8c;p=linux.git auxdisplay: img-ascii-lcd: Convert device attribute to sysfs_emit() Convert the "message" device attribute from sprintf() to sysfs_emit(), as the latter is aware of the PAGE_SIZE buffer. Signed-off-by: Geert Uytterhoeven Signed-off-by: Miguel Ojeda --- diff --git a/drivers/auxdisplay/img-ascii-lcd.c b/drivers/auxdisplay/img-ascii-lcd.c index 2b6e41ec57544..2b5640b638900 100644 --- a/drivers/auxdisplay/img-ascii-lcd.c +++ b/drivers/auxdisplay/img-ascii-lcd.c @@ -326,7 +326,7 @@ static ssize_t message_show(struct device *dev, struct device_attribute *attr, { struct img_ascii_lcd_ctx *ctx = dev_get_drvdata(dev); - return sprintf(buf, "%s\n", ctx->message); + return sysfs_emit(buf, "%s\n", ctx->message); } /**