[PATCH] sysfs.txt: use S_IRUSR | ... instead of 0644 From: Jan Veldeman Change filemode to use defines instead of 0644, based on suggestions by Walter Harms and Domen Puncer. Signed-off-by: Jan Veldeman Signed-off-by: Alexey Dobriyan Index: linux-kj/Documentation/filesystems/sysfs.txt =================================================================== --- linux-kj.orig/Documentation/filesystems/sysfs.txt 2005-09-03 14:34:08.000000000 +0400 +++ linux-kj/Documentation/filesystems/sysfs.txt 2005-09-03 14:34:09.000000000 +0400 @@ -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,