diff options
author | Wolfram Sang <wsa@the-dreams.de> | 2014-06-17 14:36:41 +0200 |
---|---|---|
committer | Wolfram Sang <wsa@the-dreams.de> | 2014-06-17 14:37:31 +0200 |
commit | f0b1f6442b5090fed3529cb39f3acf8c91693d3d (patch) | |
tree | bc5f62b017a82161c9a7f892f464813f6efd5bf3 /samples | |
parent | 4632a93f015caf6d7db4352f37aab74a39e60d7a (diff) | |
parent | 7171511eaec5bf23fb06078f59784a3a0626b38f (diff) |
Merge tag 'v3.16-rc1' into i2c/for-next
Merge a stable base (Linux 3.16-rc1)
Signed-off-by: Wolfram Sang <wsa@the-dreams.de>
Diffstat (limited to 'samples')
-rw-r--r-- | samples/kobject/kobject-example.c | 7 | ||||
-rw-r--r-- | samples/kobject/kset-example.c | 7 |
2 files changed, 8 insertions, 6 deletions
diff --git a/samples/kobject/kobject-example.c b/samples/kobject/kobject-example.c index 86ea0c3ad975..01562e0d4992 100644 --- a/samples/kobject/kobject-example.c +++ b/samples/kobject/kobject-example.c @@ -40,8 +40,9 @@ static ssize_t foo_store(struct kobject *kobj, struct kobj_attribute *attr, return count; } +/* Sysfs attributes cannot be world-writable. */ static struct kobj_attribute foo_attribute = - __ATTR(foo, 0666, foo_show, foo_store); + __ATTR(foo, 0664, foo_show, foo_store); /* * More complex function where we determine which variable is being accessed by @@ -73,9 +74,9 @@ static ssize_t b_store(struct kobject *kobj, struct kobj_attribute *attr, } static struct kobj_attribute baz_attribute = - __ATTR(baz, 0666, b_show, b_store); + __ATTR(baz, 0664, b_show, b_store); static struct kobj_attribute bar_attribute = - __ATTR(bar, 0666, b_show, b_store); + __ATTR(bar, 0664, b_show, b_store); /* diff --git a/samples/kobject/kset-example.c b/samples/kobject/kset-example.c index 5dce351f131f..ab5e447ec238 100644 --- a/samples/kobject/kset-example.c +++ b/samples/kobject/kset-example.c @@ -124,8 +124,9 @@ static ssize_t foo_store(struct foo_obj *foo_obj, struct foo_attribute *attr, return count; } +/* Sysfs attributes cannot be world-writable. */ static struct foo_attribute foo_attribute = - __ATTR(foo, 0666, foo_show, foo_store); + __ATTR(foo, 0664, foo_show, foo_store); /* * More complex function where we determine which variable is being accessed by @@ -157,9 +158,9 @@ static ssize_t b_store(struct foo_obj *foo_obj, struct foo_attribute *attr, } static struct foo_attribute baz_attribute = - __ATTR(baz, 0666, b_show, b_store); + __ATTR(baz, 0664, b_show, b_store); static struct foo_attribute bar_attribute = - __ATTR(bar, 0666, b_show, b_store); + __ATTR(bar, 0664, b_show, b_store); /* * Create a group of attributes so that we can create and destroy them all |