Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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: Jan Veldeman <Jan.Veldeman@advalvas.be>
Signed-off-by: Domen Puncer <domen@coderock.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

authored by

Jan Veldeman and committed by
Greg Kroah-Hartman
91e49001 f8d825bf

+2 -2
+2 -2
Documentation/filesystems/sysfs.txt
··· 99 99 100 100 For example, declaring 101 101 102 - static DEVICE_ATTR(foo, 0644, show_foo, store_foo); 102 + static DEVICE_ATTR(foo, S_IWUSR | S_IRUGO, show_foo, store_foo); 103 103 104 104 is equivalent to doing: 105 105 106 106 static struct device_attribute dev_attr_foo = { 107 107 .attr = { 108 108 .name = "foo", 109 - .mode = 0644, 109 + .mode = S_IWUSR | S_IRUGO, 110 110 }, 111 111 .show = show_foo, 112 112 .store = store_foo,