summaryrefslogtreecommitdiff
path: root/drivers/usb/musb
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-23 11:24:09 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-01-24 08:49:52 +0100
commit6e4294d0af78d64935c108e275a632725a4a31aa (patch)
treea2ab8c64de5e2c3755ae888bc21966bc9a688658 /drivers/usb/musb
parent6453f53b752af97cefdba8242466d8c19a86d4cb (diff)
USB: musb: fix up one odd DEVICE_ATTR() usage
It really should be DEVICE_ATTR_WO(), no need to "open code" it. Acked-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/musb')
-rw-r--r--drivers/usb/musb/musb_core.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c
index f4f2693608e6..968bf1e8b0fe 100644
--- a/drivers/usb/musb/musb_core.c
+++ b/drivers/usb/musb/musb_core.c
@@ -1778,8 +1778,7 @@ static DEVICE_ATTR_RW(vbus);
/* Gadget drivers can't know that a host is connected so they might want
* to start SRP, but users can. This allows userspace to trigger SRP.
*/
-static ssize_t
-musb_srp_store(struct device *dev, struct device_attribute *attr,
+static ssize_t srp_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t n)
{
struct musb *musb = dev_to_musb(dev);
@@ -1796,7 +1795,7 @@ musb_srp_store(struct device *dev, struct device_attribute *attr,
return n;
}
-static DEVICE_ATTR(srp, 0644, NULL, musb_srp_store);
+static DEVICE_ATTR_WO(srp);
static struct attribute *musb_attributes[] = {
&dev_attr_mode.attr,