aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorXuezhi Zhang <zhangxuezhi1@coolpad.com>2022-10-18 14:25:48 +0800
committerHelge Deller <deller@gmx.de>2022-10-18 10:22:28 +0200
commit9750737130dc7b2e4c6f4f33e7e2381e49014299 (patch)
tree6ce50059bb0d22be553663419630a659345bc65d /drivers/video
parentfbdev: stifb: Fall back to cfb_fillrect() on 32-bit HCRX cards (diff)
downloadlinux-dev-9750737130dc7b2e4c6f4f33e7e2381e49014299.tar.xz
linux-dev-9750737130dc7b2e4c6f4f33e7e2381e49014299.zip
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 <zhangxuezhi1@coolpad.com> Signed-off-by: Helge Deller <deller@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/fbdev/sm501fb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/video/fbdev/sm501fb.c b/drivers/video/fbdev/sm501fb.c
index fce6cfbadfd6..f743bfbde2a6 100644
--- a/drivers/video/fbdev/sm501fb.c
+++ b/drivers/video/fbdev/sm501fb.c
@@ -1166,7 +1166,7 @@ static ssize_t sm501fb_crtsrc_show(struct device *dev,
ctrl = smc501_readl(info->regs + SM501_DC_CRT_CONTROL);
ctrl &= SM501_DC_CRT_CONTROL_SEL;
- return snprintf(buf, PAGE_SIZE, "%s\n", ctrl ? "crt" : "panel");
+ return sysfs_emit(buf, "%s\n", ctrl ? "crt" : "panel");
}
/* sm501fb_crtsrc_show