Commit 6e4294d0 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

USB: musb: fix up one odd DEVICE_ATTR() usage

It really should be DEVICE_ATTR_WO(), no need to "open code" it.
Acked-by: default avatarBin Liu <b-liu@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6453f53b
...@@ -1778,8 +1778,7 @@ static DEVICE_ATTR_RW(vbus); ...@@ -1778,8 +1778,7 @@ static DEVICE_ATTR_RW(vbus);
/* Gadget drivers can't know that a host is connected so they might want /* 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. * to start SRP, but users can. This allows userspace to trigger SRP.
*/ */
static ssize_t static ssize_t srp_store(struct device *dev, struct device_attribute *attr,
musb_srp_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t n) const char *buf, size_t n)
{ {
struct musb *musb = dev_to_musb(dev); struct musb *musb = dev_to_musb(dev);
...@@ -1796,7 +1795,7 @@ musb_srp_store(struct device *dev, struct device_attribute *attr, ...@@ -1796,7 +1795,7 @@ musb_srp_store(struct device *dev, struct device_attribute *attr,
return n; return n;
} }
static DEVICE_ATTR(srp, 0644, NULL, musb_srp_store); static DEVICE_ATTR_WO(srp);
static struct attribute *musb_attributes[] = { static struct attribute *musb_attributes[] = {
&dev_attr_mode.attr, &dev_attr_mode.attr,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment