summaryrefslogtreecommitdiff
path: root/drivers/auxdisplay
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2021-10-19 16:45:04 +0200
committerMiguel Ojeda <ojeda@kernel.org>2021-10-21 23:36:28 +0200
commit12a19324ebd9edc08edc0d7ff27a3662e1bb6e8c (patch)
tree99ad26960df33a05165a78c58fe8897994bb99e2 /drivers/auxdisplay
parent7b88e5530f4d9d636b33d776b753a52169cc5b42 (diff)
downloadlinux-rt-12a19324ebd9edc08edc0d7ff27a3662e1bb6e8c.tar.gz
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 <geert@linux-m68k.org> Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Diffstat (limited to 'drivers/auxdisplay')
-rw-r--r--drivers/auxdisplay/img-ascii-lcd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/auxdisplay/img-ascii-lcd.c b/drivers/auxdisplay/img-ascii-lcd.c
index 2b6e41ec5754..2b5640b63890 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);
}
/**