netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Douglas Miller <dougmill@linux.vnet.ibm.com>,
	netdev@vger.kernel.org
Subject: [PATCH 06/11] net: ehea: convert to use DRIVER_ATTR_RO
Date: Fri,  9 Jun 2017 11:03:09 +0200	[thread overview]
Message-ID: <20170609090314.13991-6-gregkh@linuxfoundation.org> (raw)
In-Reply-To: <20170609090314.13991-1-gregkh@linuxfoundation.org>

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

Cc: Douglas Miller <dougmill@linux.vnet.ibm.com>
Cc: <netdev@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/net/ethernet/ibm/ehea/ehea_main.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ethernet/ibm/ehea/ehea_main.c b/drivers/net/ethernet/ibm/ehea/ehea_main.c
index 1e53d7a82675..b9d310f20bcc 100644
--- a/drivers/net/ethernet/ibm/ehea/ehea_main.c
+++ b/drivers/net/ethernet/ibm/ehea/ehea_main.c
@@ -3553,14 +3553,12 @@ static int check_module_parm(void)
 	return ret;
 }
 
-static ssize_t ehea_show_capabilities(struct device_driver *drv,
-				      char *buf)
+static ssize_t capabilities_show(struct device_driver *drv, char *buf)
 {
 	return sprintf(buf, "%d", EHEA_CAPABILITIES);
 }
 
-static DRIVER_ATTR(capabilities, S_IRUSR | S_IRGRP | S_IROTH,
-		   ehea_show_capabilities, NULL);
+static DRIVER_ATTR_RO(capabilities);
 
 static int __init ehea_module_init(void)
 {
-- 
2.13.1

  parent reply	other threads:[~2017-06-09  9:03 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20170609090314.13991-1-gregkh@linuxfoundation.org>
2017-06-09  9:03 ` [PATCH 05/11] net: caif: convert to use DRIVER_ATTR_RO Greg Kroah-Hartman
2017-06-09 16:20   ` David Miller
2017-06-09  9:03 ` Greg Kroah-Hartman [this message]
2017-06-09 16:20   ` [PATCH 06/11] net: ehea: " David Miller
2017-06-09  9:03 ` [PATCH 07/11] wireless: ipw2x00: convert to use DRIVER_ATTR_RW Greg Kroah-Hartman
2017-06-09  9:25   ` Kalle Valo
2017-06-09  9:34     ` Greg Kroah-Hartman

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=20170609090314.13991-6-gregkh@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=dougmill@linux.vnet.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).