From: <gregkh@linuxfoundation•org>
To: gregkh@linuxfoundation.org,jslaby@suse.com,linuxppc-dev@lists•ozlabs.org
Subject: patch "TTY: hvc: convert to use DRIVER_ATTR_RW" added to driver-core-testing
Date: Mon, 12 Jun 2017 16:15:22 +0200 [thread overview]
Message-ID: <149727692217130@kroah.com> (raw)
This is a note to let you know that I've just added the patch titled
TTY: hvc: convert to use DRIVER_ATTR_RW
to my driver-core git tree which can be found at
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git
in the driver-core-testing branch.
The patch will show up in the next release of the linux-next tree
(usually sometime within the next 24 hours during the week.)
The patch will be merged to the driver-core-next branch sometime soon,
after it passes testing, and the merge window is open.
If you have any questions about this process, please let me know.
>From 4e70a6fe6dc5d78939d9e155db3bd6cef28ec310 Mon Sep 17 00:00:00 2001
From: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
Date: Fri, 9 Jun 2017 11:03:07 +0200
Subject: 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: Greg Kroah-Hartman <gregkh@linuxfoundation•org>
---
drivers/tty/hvc/hvcs.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/hvc/hvcs.c b/drivers/tty/hvc/hvcs.c
index 99bb875178d7..096ea5f511bd 100644
--- a/drivers/tty/hvc/hvcs.c
+++ b/drivers/tty/hvc/hvcs.c
@@ -484,13 +484,13 @@ static struct attribute_group hvcs_attr_group = {
.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 */
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)
{
if ((simple_strtol(buf, NULL, 0) != 1)
@@ -505,8 +505,7 @@ static ssize_t hvcs_rescan_store(struct device_driver *ddp, const char * buf,
return count;
}
-static DRIVER_ATTR(rescan,
- S_IRUGO | S_IWUSR, hvcs_rescan_show, hvcs_rescan_store);
+static DRIVER_ATTR_RW(rescan);
static void hvcs_kick(void)
{
--
2.13.1
reply other threads:[~2017-06-12 14:15 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=149727692217130@kroah.com \
--to=gregkh@linuxfoundation$(echo .)org \
--cc=jslaby@suse$(echo .)com \
--cc=linuxppc-dev@lists$(echo .)ozlabs.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox