Commit 91e49001 authored by Jan Veldeman's avatar Jan Veldeman Committed by Greg Kroah-Hartman

[PATCH] Driver core: Documentation: use S_IRUSR | ... in stead of 0644

Change filemode to use defines in stead of 0644,
based on suggestions by Walter Harms and Domen Puncer.
Signed-off-by: default avatarJan Veldeman <Jan.Veldeman@advalvas.be>
Signed-off-by: default avatarDomen Puncer <domen@coderock.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f8d825bf
...@@ -99,14 +99,14 @@ struct device_attribute dev_attr_##_name = { \ ...@@ -99,14 +99,14 @@ struct device_attribute dev_attr_##_name = { \
For example, declaring For example, declaring
static DEVICE_ATTR(foo, 0644, show_foo, store_foo); static DEVICE_ATTR(foo, S_IWUSR | S_IRUGO, show_foo, store_foo);
is equivalent to doing: is equivalent to doing:
static struct device_attribute dev_attr_foo = { static struct device_attribute dev_attr_foo = {
.attr = { .attr = {
.name = "foo", .name = "foo",
.mode = 0644, .mode = S_IWUSR | S_IRUGO,
}, },
.show = show_foo, .show = show_foo,
.store = store_foo, .store = store_foo,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment