]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
pcmcia: ds: convert to use DRIVER_ATTR_RO
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Jun 2017 09:03:11 +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 pcmcia driver's
attribute can be trivially changed to use DRIVER_ATTR_RO().

Cc: Russell King <rmk+kernel@armlinux.org.uk>
Cc: <linux-pcmcia@lists.infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/pcmcia/ds.c

index 69b5e811ea2b2c2c02a902434063196f31425892..a9258f641ceed7a077aa08af4219bc2e1a25e6f9 100644 (file)
@@ -95,7 +95,7 @@ struct pcmcia_dynid {
  * and causes the driver to probe for all devices again.
  */
 static ssize_t
-pcmcia_store_new_id(struct device_driver *driver, const char *buf, size_t count)
+new_id_store(struct device_driver *driver, const char *buf, size_t count)
 {
        struct pcmcia_dynid *dynid;
        struct pcmcia_driver *pdrv = to_pcmcia_drv(driver);
@@ -133,7 +133,7 @@ pcmcia_store_new_id(struct device_driver *driver, const char *buf, size_t count)
                return retval;
        return count;
 }
-static DRIVER_ATTR(new_id, S_IWUSR, NULL, pcmcia_store_new_id);
+static DRIVER_ATTR_WO(new_id);
 
 static void
 pcmcia_free_dynids(struct pcmcia_driver *drv)