Skip to content

Commit d9387ed

Browse files
ye xingchenwsakernel
authored andcommitted
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 <[email protected]> Tested-by: Wolfram Sang <[email protected]> [wsa: proper subject prefix] Signed-off-by: Wolfram Sang <[email protected]>
1 parent d8d9919 commit d9387ed

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/i2c/muxes/i2c-demux-pinctrl.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,9 +167,9 @@ static ssize_t available_masters_show(struct device *dev,
167167
int count = 0, i;
168168

169169
for (i = 0; i < priv->num_chan && count < PAGE_SIZE; i++)
170-
count += scnprintf(buf + count, PAGE_SIZE - count, "%d:%pOF%c",
171-
i, priv->chan[i].parent_np,
172-
i == priv->num_chan - 1 ? '\n' : ' ');
170+
count += sysfs_emit_at(buf, count, "%d:%pOF%c",
171+
i, priv->chan[i].parent_np,
172+
i == priv->num_chan - 1 ? '\n' : ' ');
173173

174174
return count;
175175
}

0 commit comments

Comments
 (0)