summaryrefslogtreecommitdiff
path: root/drivers/i2c
diff options
context:
space:
mode:
authorye xingchen <ye.xingchen@zte.com.cn>2022-12-07 05:48:33 +0300
committerWolfram Sang <wsa@kernel.org>2023-10-29 22:27:48 +0300
commitd9387eda56a49b2cf4487b3c4f12500190e6bb88 (patch)
treef63f4ae94950b0034b4451f49016ee7c98315ee1 /drivers/i2c
parentd8d9919f4579a04d250b754e15597bfcf9379c14 (diff)
downloadlinux-d9387eda56a49b2cf4487b3c4f12500190e6bb88.tar.xz
i2c: mux: demux-pinctrl: Convert to use sysfs_emit_at() API
Follow the advice of the Documentation/filesystems/sysfs.rst and show() should only use sysfs_emit() or sysfs_emit_at() when formatting the value to be returned to user space. Signed-off-by: ye xingchen <ye.xingchen@zte.com.cn> Tested-by: Wolfram Sang <wsa+renesas@sang-engineering.com> [wsa: proper subject prefix] Signed-off-by: Wolfram Sang <wsa@kernel.org>
Diffstat (limited to 'drivers/i2c')
-rw-r--r--drivers/i2c/muxes/i2c-demux-pinctrl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/i2c/muxes/i2c-demux-pinctrl.c b/drivers/i2c/muxes/i2c-demux-pinctrl.c
index ee5fb60651e7..bc309b6147eb 100644
--- a/drivers/i2c/muxes/i2c-demux-pinctrl.c
+++ b/drivers/i2c/muxes/i2c-demux-pinctrl.c
@@ -167,9 +167,9 @@ static ssize_t available_masters_show(struct device *dev,
int count = 0, i;
for (i = 0; i < priv->num_chan && count < PAGE_SIZE; i++)
- count += scnprintf(buf + count, PAGE_SIZE - count, "%d:%pOF%c",
- i, priv->chan[i].parent_np,
- i == priv->num_chan - 1 ? '\n' : ' ');
+ count += sysfs_emit_at(buf, count, "%d:%pOF%c",
+ i, priv->chan[i].parent_np,
+ i == priv->num_chan - 1 ? '\n' : ' ');
return count;
}