Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751767AbdFIJEE (ORCPT ); Fri, 9 Jun 2017 05:04:04 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:43256 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751685AbdFIJD6 (ORCPT ); Fri, 9 Jun 2017 05:03:58 -0400 From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Jiri Slaby , linuxppc-dev@lists.ozlabs.org Subject: [PATCH 04/11] TTY: hvc: convert to use DRIVER_ATTR_RW Date: Fri, 9 Jun 2017 11:03:07 +0200 Message-Id: <20170609090314.13991-4-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.13.1 In-Reply-To: <20170609090314.13991-1-gregkh@linuxfoundation.org> References: <20170609090314.13991-1-gregkh@linuxfoundation.org> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1376 Lines: 42 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 Cc: Signed-off-by: Greg Kroah-Hartman --- 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