summaryrefslogtreecommitdiffstats
path: root/drivers/usb/usbip/vudc_sysfs.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-23 11:24:07 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-24 08:49:52 +0100
commitca35910a1ba21e45368640ac4d884536649966d9 (patch)
tree1040bfbe2783b8306c95d9eb99346a325d6d3f0d /drivers/usb/usbip/vudc_sysfs.c
parent7f26ee4b56496f1bec4672cfe4e1c4808fb7e81f (diff)
downloadtalos-obmc-linux-ca35910a1ba21e45368640ac4d884536649966d9.tar.gz
talos-obmc-linux-ca35910a1ba21e45368640ac4d884536649966d9.zip
USB: move many drivers to use DEVICE_ATTR_WO
Instead of "open coding" a DEVICE_ATTR() define, use the DEVICE_ATTR_WO() macro instead, which does everything properly instead. This does require a few static functions to be renamed to work properly, but thanks to a script from Joe Perches, this was easily done. Reported-by: Joe Perches <joe@perches.com> Cc: Peter Chen <Peter.Chen@nxp.com> Cc: Valentina Manea <valentina.manea.m@gmail.com> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Johan Hovold <johan@kernel.org> Acked-by: Shuah Khan <shuahkh@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/usbip/vudc_sysfs.c')
-rw-r--r--drivers/usb/usbip/vudc_sysfs.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/usb/usbip/vudc_sysfs.c b/drivers/usb/usbip/vudc_sysfs.c
index 1adc8af292ec..d86f72bbbb91 100644
--- a/drivers/usb/usbip/vudc_sysfs.c
+++ b/drivers/usb/usbip/vudc_sysfs.c
@@ -90,7 +90,7 @@ unlock:
}
static BIN_ATTR_RO(dev_desc, sizeof(struct usb_device_descriptor));
-static ssize_t store_sockfd(struct device *dev, struct device_attribute *attr,
+static ssize_t usbip_sockfd_store(struct device *dev, struct device_attribute *attr,
const char *in, size_t count)
{
struct vudc *udc = (struct vudc *) dev_get_drvdata(dev);
@@ -180,7 +180,7 @@ unlock:
return ret;
}
-static DEVICE_ATTR(usbip_sockfd, S_IWUSR, NULL, store_sockfd);
+static DEVICE_ATTR_WO(usbip_sockfd);
static ssize_t usbip_status_show(struct device *dev,
struct device_attribute *attr, char *out)
OpenPOWER on IntegriCloud