Skip to content

Commit

Permalink
Merge pull request #273 from NOVBobLee/pr_patch
Browse files Browse the repository at this point in the history
Correct the function type
  • Loading branch information
jserv authored Oct 8, 2024
2 parents 3203aa3 + 93b35f7 commit 756871e
Showing 1 changed file with 2 additions and 2 deletions.
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, "%d", &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

0 comments on commit 756871e

Please sign in to comment.