[PATCH v2 3/4] i2c: muxes: pca954x: use sysfs_emit() in idle_state_show()

From: Pradhan, Sanman

Date: Thu Sep 03 2026 - 19:47:51 EST


From: Sanman Pradhan <psanman@xxxxxxxxxxx>

Use sysfs_emit() instead of sprintf() in the sysfs show callback, as
recommended for sysfs output. No functional change.

Signed-off-by: Sanman Pradhan <psanman@xxxxxxxxxxx>
---
drivers/i2c/muxes/i2c-mux-pca954x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/muxes/i2c-mux-pca954x.c b/drivers/i2c/muxes/i2c-mux-pca954x.c
index 3da54d5f33008..b52e0464b40ee 100644
--- a/drivers/i2c/muxes/i2c-mux-pca954x.c
+++ b/drivers/i2c/muxes/i2c-mux-pca954x.c
@@ -365,7 +365,7 @@ static ssize_t idle_state_show(struct device *dev,
struct i2c_mux_core *muxc = i2c_get_clientdata(client);
struct pca954x *data = i2c_mux_priv(muxc);

- return sprintf(buf, "%d\n", READ_ONCE(data->idle_state));
+ return sysfs_emit(buf, "%d\n", READ_ONCE(data->idle_state));
}

static ssize_t idle_state_store(struct device *dev,
--
2.34.1