mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 22:02:02 +00:00
USB: usbsevseg: convert sysfs snprintf to sysfs_emit
Fix the following coccincheck warning: drivers/usb/misc/usbsevseg.c:170:8-16: WARNING: use scnprintf or sprintf Signed-off-by: Xuezhi Zhang <zhangxuezhi1@coolpad.com> Link: https://lore.kernel.org/r/20220727124415.8340-1-zhangxuezhi3@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
40e58a8a7c
commit
e0c6b1f3d7
1 changed files with 1 additions and 1 deletions
|
@ -167,7 +167,7 @@ static ssize_t text_show(struct device *dev,
|
|||
struct usb_interface *intf = to_usb_interface(dev);
|
||||
struct usb_sevsegdev *mydev = usb_get_intfdata(intf);
|
||||
|
||||
return snprintf(buf, mydev->textlength, "%s\n", mydev->text);
|
||||
return sysfs_emit(buf, "%s\n", mydev->text);
|
||||
}
|
||||
|
||||
static ssize_t text_store(struct device *dev,
|
||||
|
|
Loading…
Reference in a new issue