Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Xuezhi Zhang and committed by
Helge Deller
97507371 776d875f

+1 -1
+1 -1
drivers/video/fbdev/sm501fb.c
··· 1166 1166 ctrl = smc501_readl(info->regs + SM501_DC_CRT_CONTROL); 1167 1167 ctrl &= SM501_DC_CRT_CONTROL_SEL; 1168 1168 1169 - return snprintf(buf, PAGE_SIZE, "%s\n", ctrl ? "crt" : "panel"); 1169 + return sysfs_emit(buf, "%s\n", ctrl ? "crt" : "panel"); 1170 1170 } 1171 1171 1172 1172 /* sm501fb_crtsrc_show