public inbox for linux-spi@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: tle62x0: Add newline to sysfs attribute output
@ 2025-10-30 12:47 Zhongqiu Han
  2025-10-30 14:54 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Zhongqiu Han @ 2025-10-30 12:47 UTC (permalink / raw)
  To: broonie; +Cc: linux-spi, linux-kernel, zhongqiu.han

Append a newline to the sysfs_emit() output in tle62x0_gpio_show. This
aligns with common kernel conventions and improves readability for
userspace tools that expect newline-terminated values.

Signed-off-by: Zhongqiu Han <zhongqiu.han@oss.qualcomm.com>
---
 drivers/spi/spi-tle62x0.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/spi/spi-tle62x0.c b/drivers/spi/spi-tle62x0.c
index a565352f6381..663c0136d119 100644
--- a/drivers/spi/spi-tle62x0.c
+++ b/drivers/spi/spi-tle62x0.c
@@ -141,7 +141,7 @@ static ssize_t tle62x0_gpio_show(struct device *dev,
 	value = (st->gpio_state >> gpio_num) & 1;
 	mutex_unlock(&st->lock);
 
-	return sysfs_emit(buf, "%d", value);
+	return sysfs_emit(buf, "%d\n", value);
 }
 
 static ssize_t tle62x0_gpio_store(struct device *dev,
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2025-10-30 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-10-30 12:47 [PATCH] spi: tle62x0: Add newline to sysfs attribute output Zhongqiu Han
2025-10-30 14:54 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox