summaryrefslogtreecommitdiff
path: root/samples/kobject/kset-example.c
diff options
context:
space:
mode:
Diffstat (limited to 'samples/kobject/kset-example.c')
-rw-r--r--samples/kobject/kset-example.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/samples/kobject/kset-example.c b/samples/kobject/kset-example.c
index c8010f126808..52f1acabd479 100644
--- a/samples/kobject/kset-example.c
+++ b/samples/kobject/kset-example.c
@@ -112,7 +112,7 @@ static void foo_release(struct kobject *kobj)
static ssize_t foo_show(struct foo_obj *foo_obj, struct foo_attribute *attr,
char *buf)
{
- return sprintf(buf, "%d\n", foo_obj->foo);
+ return sysfs_emit(buf, "%d\n", foo_obj->foo);
}
static ssize_t foo_store(struct foo_obj *foo_obj, struct foo_attribute *attr,
@@ -144,7 +144,7 @@ static ssize_t b_show(struct foo_obj *foo_obj, struct foo_attribute *attr,
var = foo_obj->baz;
else
var = foo_obj->bar;
- return sprintf(buf, "%d\n", var);
+ return sysfs_emit(buf, "%d\n", var);
}
static ssize_t b_store(struct foo_obj *foo_obj, struct foo_attribute *attr,