Commit 12a19324 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Miguel Ojeda

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: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarMiguel Ojeda <ojeda@kernel.org>
parent 7b88e553
...@@ -326,7 +326,7 @@ static ssize_t message_show(struct device *dev, struct device_attribute *attr, ...@@ -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); 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);
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment