summaryrefslogtreecommitdiff
path: root/samples/kobject/kobject-example.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/kobject/kobject-example.c')
-rw-r--r--samples/kobject/kobject-example.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/kobject/kobject-example.c b/samples/kobject/kobject-example.c
index 9e383fdbaa00..96678ed73216 100644
--- a/samples/kobject/kobject-example.c
+++ b/samples/kobject/kobject-example.c
@@ -28,7 +28,7 @@ static int bar;
static ssize_t foo_show(struct kobject *kobj, struct kobj_attribute *attr,
char *buf)
{
- return sprintf(buf, "%d\n", foo);
+ return sysfs_emit(buf, "%d\n", foo);
}
static ssize_t foo_store(struct kobject *kobj, struct kobj_attribute *attr,
@@ -60,7 +60,7 @@ static ssize_t b_show(struct kobject *kobj, struct kobj_attribute *attr,
var = baz;
else
var = bar;
- return sprintf(buf, "%d\n", var);
+ return sysfs_emit(buf, "%d\n", var);
}
static ssize_t b_store(struct kobject *kobj, struct kobj_attribute *attr,