net: ehea: convert to use DRIVER_ATTR_RO
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2017 09:03:09 +0000 (11:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 12 Jun 2017 14:14:30 +0000 (16:14 +0200)
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>
Acked-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/ethernet/ibm/ehea/ehea_main.c

index 1e53d7a82675f3e7fee8db985922331ecf2cadc3..b9d310f20bcc1c69ac3423e49bfa75f1e2a64fea 100644 (file)
@@ -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)
 {