[PATCH 3/4] i2c: muxes: pca954x: use sysfs_emit() in idle_state_show()
From: Pradhan, Sanman
Date: Wed Apr 15 2026 - 13:07:41 EST
From: Sanman Pradhan <psanman@xxxxxxxxxxx>
Use sysfs_emit() as recommended for sysfs show callbacks.
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 c20a161e6a5b..4803231e4c4b 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