driver core: firmware: use __ATTR_RW()
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Aug 2013 00:08:48 +0000 (17:08 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 24 Aug 2013 00:08:48 +0000 (17:08 -0700)
Use __ATTR_RW() instead of __ATTR() to make it more obvious what the
type of attribute is being created.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/base/firmware_class.c

index a439602ea9194f409286147d4e33b39cc1114cda..e4107d5f036b408a3c4d71b34838cbd1dd424540 100644 (file)
@@ -486,9 +486,8 @@ static struct notifier_block fw_shutdown_nb = {
        .notifier_call = fw_shutdown_notify,
 };
 
-static ssize_t firmware_timeout_show(struct class *class,
-                                    struct class_attribute *attr,
-                                    char *buf)
+static ssize_t timeout_show(struct class *class, struct class_attribute *attr,
+                           char *buf)
 {
        return sprintf(buf, "%d\n", loading_timeout);
 }
@@ -506,9 +505,8 @@ static ssize_t firmware_timeout_show(struct class *class,
  *
  *     Note: zero means 'wait forever'.
  **/
-static ssize_t firmware_timeout_store(struct class *class,
-                                     struct class_attribute *attr,
-                                     const char *buf, size_t count)
+static ssize_t timeout_store(struct class *class, struct class_attribute *attr,
+                            const char *buf, size_t count)
 {
        loading_timeout = simple_strtol(buf, NULL, 10);
        if (loading_timeout < 0)
@@ -518,8 +516,7 @@ static ssize_t firmware_timeout_store(struct class *class,
 }
 
 static struct class_attribute firmware_class_attrs[] = {
-       __ATTR(timeout, S_IWUSR | S_IRUGO,
-               firmware_timeout_show, firmware_timeout_store),
+       __ATTR_RW(timeout),
        __ATTR_NULL
 };
 
This page took 0.031584 seconds and 5 git commands to generate.