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 88f8ff38662dcaf4f9eabf2c0ace9db6146fb31f..f6ec8f23e86d07144ee26edae923c29557c5443c 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"));
 }