Skip to content

Commit 12a1932

Browse files
geertuojeda
authored andcommitted
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 <[email protected]> Signed-off-by: Miguel Ojeda <[email protected]>
1 parent 7b88e55 commit 12a1932

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/auxdisplay/img-ascii-lcd.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -326,7 +326,7 @@ static ssize_t message_show(struct device *dev, struct device_attribute *attr,
326326
{
327327
struct img_ascii_lcd_ctx *ctx = dev_get_drvdata(dev);
328328

329-
return sprintf(buf, "%s\n", ctx->message);
329+
return sysfs_emit(buf, "%s\n", ctx->message);
330330
}
331331

332332
/**

0 commit comments

Comments
 (0)