Documentation/filesystems/sysfs.txt: fix device_attribute declaration
authorAndre Richter <andre.o.richter@gmail.com>
Thu, 23 Jan 2014 23:55:26 +0000 (15:55 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 24 Jan 2014 00:37:00 +0000 (16:37 -0800)
Fix a wrong device_attribute declaration example.

Signed-off-by: Andre Richter <andre.o.richter@gmail.com>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Documentation/filesystems/sysfs.txt

index a6619b7064b9e679b887d31ec85301d300c088f5..b35a64b82f9e8371d42fcf893354d02c07c6c229 100644 (file)
@@ -108,12 +108,12 @@ static DEVICE_ATTR(foo, S_IWUSR | S_IRUGO, show_foo, store_foo);
 is equivalent to doing:
 
 static struct device_attribute dev_attr_foo = {
 is equivalent to doing:
 
 static struct device_attribute dev_attr_foo = {
-       .attr   = {
+       .attr = {
                .name = "foo",
                .mode = S_IWUSR | S_IRUGO,
                .name = "foo",
                .mode = S_IWUSR | S_IRUGO,
-               .show = show_foo,
-               .store = store_foo,
        },
        },
+       .show = show_foo,
+       .store = store_foo,
 };
 
 
 };