Commit 4e70a6fe authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

TTY: hvc: convert to use DRIVER_ATTR_RW

We are trying to get rid of DRIVER_ATTR(), and the hvc driver's
attribute can be trivially changed to use DRIVER_ATTR_RW().

Cc: Jiri Slaby <jslaby@suse.com>
Cc: <linuxppc-dev@lists.ozlabs.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a9427741
...@@ -484,13 +484,13 @@ static struct attribute_group hvcs_attr_group = { ...@@ -484,13 +484,13 @@ static struct attribute_group hvcs_attr_group = {
.attrs = hvcs_attrs, .attrs = hvcs_attrs,
}; };
static ssize_t hvcs_rescan_show(struct device_driver *ddp, char *buf) static ssize_t rescan_show(struct device_driver *ddp, char *buf)
{ {
/* A 1 means it is updating, a 0 means it is done updating */ /* A 1 means it is updating, a 0 means it is done updating */
return snprintf(buf, PAGE_SIZE, "%d\n", hvcs_rescan_status); return snprintf(buf, PAGE_SIZE, "%d\n", hvcs_rescan_status);
} }
static ssize_t hvcs_rescan_store(struct device_driver *ddp, const char * buf, static ssize_t rescan_store(struct device_driver *ddp, const char * buf,
size_t count) size_t count)
{ {
if ((simple_strtol(buf, NULL, 0) != 1) if ((simple_strtol(buf, NULL, 0) != 1)
...@@ -505,8 +505,7 @@ static ssize_t hvcs_rescan_store(struct device_driver *ddp, const char * buf, ...@@ -505,8 +505,7 @@ static ssize_t hvcs_rescan_store(struct device_driver *ddp, const char * buf,
return count; return count;
} }
static DRIVER_ATTR(rescan, static DRIVER_ATTR_RW(rescan);
S_IRUGO | S_IWUSR, hvcs_rescan_show, hvcs_rescan_store);
static void hvcs_kick(void) static void hvcs_kick(void)
{ {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment