Staging: quickstart: Use scnprintf in quickstart_pressed_button_show
authorSzymon Janc <szymon@janc.net.pl>
Fri, 10 Feb 2012 20:05:42 +0000 (21:05 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 14 Feb 2012 04:08:55 +0000 (20:08 -0800)
Use scnprintf instead of snprintf in quickstart_pressed_button_show as
suggested in Documentation/filesystems/sysfs.txt.

Signed-off-by: Szymon Janc <szymon@janc.net.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/quickstart/quickstart.c

index 88f8ff3..f6ec8f2 100644 (file)
@@ -98,7 +98,7 @@ static ssize_t quickstart_pressed_button_show(struct device *dev,
                                                struct device_attribute *attr,
                                                char *buf)
 {
-       return snprintf(buf, PAGE_SIZE, "%s\n",
+       return scnprintf(buf, PAGE_SIZE, "%s\n",
                                        (pressed ? pressed->name : "none"));
 }