Skip to content
Snippets Groups Projects
Commit 14adbe53 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent c5e064a6
No related branches found
No related tags found
No related merge requests found
...@@ -486,9 +486,8 @@ static struct notifier_block fw_shutdown_nb = { ...@@ -486,9 +486,8 @@ static struct notifier_block fw_shutdown_nb = {
.notifier_call = fw_shutdown_notify, .notifier_call = fw_shutdown_notify,
}; };
static ssize_t firmware_timeout_show(struct class *class, static ssize_t timeout_show(struct class *class, struct class_attribute *attr,
struct class_attribute *attr, char *buf)
char *buf)
{ {
return sprintf(buf, "%d\n", loading_timeout); return sprintf(buf, "%d\n", loading_timeout);
} }
...@@ -506,9 +505,8 @@ static ssize_t firmware_timeout_show(struct class *class, ...@@ -506,9 +505,8 @@ static ssize_t firmware_timeout_show(struct class *class,
* *
* Note: zero means 'wait forever'. * Note: zero means 'wait forever'.
**/ **/
static ssize_t firmware_timeout_store(struct class *class, static ssize_t timeout_store(struct class *class, struct class_attribute *attr,
struct class_attribute *attr, const char *buf, size_t count)
const char *buf, size_t count)
{ {
loading_timeout = simple_strtol(buf, NULL, 10); loading_timeout = simple_strtol(buf, NULL, 10);
if (loading_timeout < 0) if (loading_timeout < 0)
...@@ -518,8 +516,7 @@ static ssize_t firmware_timeout_store(struct class *class, ...@@ -518,8 +516,7 @@ static ssize_t firmware_timeout_store(struct class *class,
} }
static struct class_attribute firmware_class_attrs[] = { static struct class_attribute firmware_class_attrs[] = {
__ATTR(timeout, S_IWUSR | S_IRUGO, __ATTR_RW(timeout),
firmware_timeout_show, firmware_timeout_store),
__ATTR_NULL __ATTR_NULL
}; };
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment