Skip to content

Commit

Permalink
[PATCH] Driver core: Documentation: use S_IRUSR | ... in stead of 0644
Browse files Browse the repository at this point in the history
Change filemode to use defines in stead of 0644,
based on suggestions by Walter Harms and Domen Puncer.

Signed-off-by: Jan Veldeman <Jan.Veldeman@advalvas.be>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Jan Veldeman authored and Greg Kroah-Hartman committed Sep 5, 2005
1 parent f8d825b commit 91e4900
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Documentation/filesystems/sysfs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,14 @@ struct device_attribute dev_attr_##_name = { \

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:

static struct device_attribute dev_attr_foo = {
.attr = {
.name = "foo",
.mode = 0644,
.mode = S_IWUSR | S_IRUGO,
},
.show = show_foo,
.store = store_foo,
Expand Down

0 comments on commit 91e4900

Please sign in to comment.