diff options
author | Felipe Balbi <balbi@ti.com> | 2011-09-08 14:12:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-09-26 15:36:07 -0700 |
commit | 865569ba5a8b0cc840e2b9c16ca6b42d6d5306b4 (patch) | |
tree | b9f125ca3c3c6f3db2b131d65f58d026d5095b77 /drivers/usb/gadget/udc-core.c | |
parent | 598f0b703506da841d3459dc0c48506be14d1778 (diff) | |
download | op-kernel-dev-865569ba5a8b0cc840e2b9c16ca6b42d6d5306b4.zip op-kernel-dev-865569ba5a8b0cc840e2b9c16ca6b42d6d5306b4.tar.gz |
usb: gadget: udc-core: fix bug on soft_connect interface
We should not be using dev_get_drvdata() because we
never call dev_set_drvdata(). Let's use container_of()
as all other sysfs attributes.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/usb/gadget/udc-core.c')
-rw-r--r-- | drivers/usb/gadget/udc-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/gadget/udc-core.c b/drivers/usb/gadget/udc-core.c index 5e77a46..022baec 100644 --- a/drivers/usb/gadget/udc-core.c +++ b/drivers/usb/gadget/udc-core.c @@ -356,7 +356,7 @@ static DEVICE_ATTR(srp, S_IWUSR, NULL, usb_udc_srp_store); static ssize_t usb_udc_softconn_store(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) { - struct usb_udc *udc = dev_get_drvdata(dev); + struct usb_udc *udc = container_of(dev, struct usb_udc, dev); if (sysfs_streq(buf, "connect")) { usb_gadget_connect(udc->gadget); |