diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 20:08:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-08-23 20:08:48 -0400 |
commit | 14adbe5307a4110af7d1e95fb604a1abcdaa6cce (patch) | |
tree | aeda2d8ce76238b033d6d6b031e2abf70d331c73 /drivers/base | |
parent | c5e064a6981603de65c61c4989856e984c7ad66d (diff) |
driver core: firmware: use __ATTR_RW()
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>
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/firmware_class.c | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/base/firmware_class.c b/drivers/base/firmware_class.c index a439602ea919..e4107d5f036b 100644 --- a/drivers/base/firmware_class.c +++ b/drivers/base/firmware_class.c | |||
@@ -486,9 +486,8 @@ static struct notifier_block fw_shutdown_nb = { | |||
486 | .notifier_call = fw_shutdown_notify, | 486 | .notifier_call = fw_shutdown_notify, |
487 | }; | 487 | }; |
488 | 488 | ||
489 | static ssize_t firmware_timeout_show(struct class *class, | 489 | static ssize_t timeout_show(struct class *class, struct class_attribute *attr, |
490 | struct class_attribute *attr, | 490 | char *buf) |
491 | char *buf) | ||
492 | { | 491 | { |
493 | return sprintf(buf, "%d\n", loading_timeout); | 492 | return sprintf(buf, "%d\n", loading_timeout); |
494 | } | 493 | } |
@@ -506,9 +505,8 @@ static ssize_t firmware_timeout_show(struct class *class, | |||
506 | * | 505 | * |
507 | * Note: zero means 'wait forever'. | 506 | * Note: zero means 'wait forever'. |
508 | **/ | 507 | **/ |
509 | static ssize_t firmware_timeout_store(struct class *class, | 508 | static ssize_t timeout_store(struct class *class, struct class_attribute *attr, |
510 | struct class_attribute *attr, | 509 | const char *buf, size_t count) |
511 | const char *buf, size_t count) | ||
512 | { | 510 | { |
513 | loading_timeout = simple_strtol(buf, NULL, 10); | 511 | loading_timeout = simple_strtol(buf, NULL, 10); |
514 | if (loading_timeout < 0) | 512 | if (loading_timeout < 0) |
@@ -518,8 +516,7 @@ static ssize_t firmware_timeout_store(struct class *class, | |||
518 | } | 516 | } |
519 | 517 | ||
520 | static struct class_attribute firmware_class_attrs[] = { | 518 | static struct class_attribute firmware_class_attrs[] = { |
521 | __ATTR(timeout, S_IWUSR | S_IRUGO, | 519 | __ATTR_RW(timeout), |
522 | firmware_timeout_show, firmware_timeout_store), | ||
523 | __ATTR_NULL | 520 | __ATTR_NULL |
524 | }; | 521 | }; |
525 | 522 | ||