Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/hello-sysfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ static ssize_t myvariable_show(struct kobject *kobj,
}

static ssize_t myvariable_store(struct kobject *kobj,
struct kobj_attribute *attr, char *buf,
struct kobj_attribute *attr, const char *buf,
size_t count)
{
sscanf(buf, "%du", &myvariable);
return count;
}

static struct kobj_attribute myvariable_attribute =
__ATTR(myvariable, 0660, myvariable_show, (void *)myvariable_store);
__ATTR(myvariable, 0660, myvariable_show, myvariable_store);

static int __init mymodule_init(void)
{
Expand Down
Loading