Skip to content

Commit 9750737

Browse files
Xuezhi Zhanghdeller
authored andcommitted
fbdev: sm501fb: Convert sysfs snprintf to sysfs_emit
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: Xuezhi Zhang <[email protected]> Signed-off-by: Helge Deller <[email protected]>
1 parent 776d875 commit 9750737

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/video/fbdev/sm501fb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1166,7 +1166,7 @@ static ssize_t sm501fb_crtsrc_show(struct device *dev,
11661166
ctrl = smc501_readl(info->regs + SM501_DC_CRT_CONTROL);
11671167
ctrl &= SM501_DC_CRT_CONTROL_SEL;
11681168

1169-
return snprintf(buf, PAGE_SIZE, "%s\n", ctrl ? "crt" : "panel");
1169+
return sysfs_emit(buf, "%s\n", ctrl ? "crt" : "panel");
11701170
}
11711171

11721172
/* sm501fb_crtsrc_show

0 commit comments

Comments
 (0)