aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/filesystems/sysfs.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/filesystems/sysfs.rst')
-rw-r--r--Documentation/filesystems/sysfs.rst2
1 files changed, 1 insertions, 1 deletions
diff --git a/Documentation/filesystems/sysfs.rst b/Documentation/filesystems/sysfs.rst
index 004d490179f3..8bba676b1365 100644
--- a/Documentation/filesystems/sysfs.rst
+++ b/Documentation/filesystems/sysfs.rst
@@ -263,7 +263,7 @@ A very simple (and naive) implementation of a device attribute is::
static ssize_t show_name(struct device *dev, struct device_attribute *attr,
char *buf)
{
- return scnprintf(buf, PAGE_SIZE, "%s\n", dev->name);
+ return sysfs_emit(buf, "%s\n", dev->name);
}
static ssize_t store_name(struct device *dev, struct device_attribute *attr,