[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20211012183327.649865-6-geert@linux-m68k.org>
Date: Tue, 12 Oct 2021 20:33:11 +0200
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: Miguel Ojeda <ojeda@...nel.org>
Cc: Robin van der Gracht <robin@...tonic.nl>,
Rob Herring <robh+dt@...nel.org>,
Paul Burton <paulburton@...nel.org>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
Pavel Machek <pavel@....cz>, Marek Behun <marek.behun@....cz>,
devicetree@...r.kernel.org, linux-leds@...r.kernel.org,
linux-mips@...r.kernel.org, linux-kernel@...r.kernel.org,
Geert Uytterhoeven <geert@...ux-m68k.org>
Subject: [PATCH v7 05/21] 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@...ux-m68k.org>
---
v7:
- No changes,
v6:
- No changes,
v5:
- No changes,
v4:
- No changes,
v3:
- No changes,
v2:
- No changes.
---
drivers/auxdisplay/img-ascii-lcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/auxdisplay/img-ascii-lcd.c b/drivers/auxdisplay/img-ascii-lcd.c
index 2b6e41ec57544faa..2b5640b638900a90 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);
}
/**
--
2.25.1
Powered by blists - more mailing lists