Skip to content

Commit 756871e

Browse files
authored
Merge pull request #273 from NOVBobLee/pr_patch
Correct the function type
2 parents 3203aa3 + 93b35f7 commit 756871e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

examples/hello-sysfs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@ static ssize_t myvariable_show(struct kobject *kobj,
2020
}
2121

2222
static ssize_t myvariable_store(struct kobject *kobj,
23-
struct kobj_attribute *attr, char *buf,
23+
struct kobj_attribute *attr, const char *buf,
2424
size_t count)
2525
{
2626
sscanf(buf, "%d", &myvariable);
2727
return count;
2828
}
2929

3030
static struct kobj_attribute myvariable_attribute =
31-
__ATTR(myvariable, 0660, myvariable_show, (void *)myvariable_store);
31+
__ATTR(myvariable, 0660, myvariable_show, myvariable_store);
3232

3333
static int __init mymodule_init(void)
3434
{

0 commit comments

Comments
 (0)