diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-15 13:24:55 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2015-02-15 13:24:55 -0500 |
commit | e29876723f7cb7728f0d6a674d23f92673e9f112 (patch) | |
tree | ea1da8bf77139f6cc6de029988208a7eddaf2002 /drivers/usb/gadget/udc/net2272.c | |
parent | 8c988ae787af4900bec5410658e8a82844185c85 (diff) | |
parent | 4d4bac4499e9955521af80198063ef9c2f2bd634 (diff) |
Merge tag 'usb-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB patches from Greg KH:
"Here's the big pull request for the USB driver tree for 3.20-rc1.
Nothing major happening here, just lots of gadget driver updates, new
device ids, and a bunch of cleanups.
All of these have been in linux-next for a while with no reported
issues"
* tag 'usb-3.20-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (299 commits)
usb: musb: fix device hotplug behind hub
usb: dwc2: Fix a bug in reading the endpoint directions from reg.
staging: emxx_udc: fix the build error
usb: Retry port status check on resume to work around RH bugs
Revert "usb: Reset USB-3 devices on USB-3 link bounce"
uhci-hub: use HUB_CHAR_*
usb: kconfig: replace PPC_OF with PPC
ehci-pci: disable for Intel MID platforms (update)
usb: gadget: Kconfig: use bool instead of boolean
usb: musb: blackfin: remove incorrect __exit_p()
USB: fix use-after-free bug in usb_hcd_unlink_urb()
ehci-pci: disable for Intel MID platforms
usb: host: pci_quirks: joing string literals
USB: add flag for HCDs that can't receive wakeup requests (isp1760-hcd)
USB: usbfs: allow URBs to be reaped after disconnection
cdc-acm: kill unnecessary messages
cdc-acm: add sanity checks
usb: phy: phy-generic: Fix USB PHY gpio reset
usb: dwc2: fix USB core dependencies
usb: renesas_usbhs: fix NULL pointer dereference in dma_release_channel()
...
Diffstat (limited to 'drivers/usb/gadget/udc/net2272.c')
-rw-r--r-- | drivers/usb/gadget/udc/net2272.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/drivers/usb/gadget/udc/net2272.c b/drivers/usb/gadget/udc/net2272.c index d20de1fab08e..195baf3e1fcd 100644 --- a/drivers/usb/gadget/udc/net2272.c +++ b/drivers/usb/gadget/udc/net2272.c | |||
@@ -1132,13 +1132,10 @@ net2272_wakeup(struct usb_gadget *_gadget) | |||
1132 | static int | 1132 | static int |
1133 | net2272_set_selfpowered(struct usb_gadget *_gadget, int value) | 1133 | net2272_set_selfpowered(struct usb_gadget *_gadget, int value) |
1134 | { | 1134 | { |
1135 | struct net2272 *dev; | ||
1136 | |||
1137 | if (!_gadget) | 1135 | if (!_gadget) |
1138 | return -ENODEV; | 1136 | return -ENODEV; |
1139 | dev = container_of(_gadget, struct net2272, gadget); | ||
1140 | 1137 | ||
1141 | dev->is_selfpowered = value; | 1138 | _gadget->is_selfpowered = (value != 0); |
1142 | 1139 | ||
1143 | return 0; | 1140 | return 0; |
1144 | } | 1141 | } |
@@ -1844,7 +1841,7 @@ net2272_handle_stat0_irqs(struct net2272 *dev, u8 stat) | |||
1844 | case USB_RECIP_DEVICE: | 1841 | case USB_RECIP_DEVICE: |
1845 | if (u.r.wLength > 2) | 1842 | if (u.r.wLength > 2) |
1846 | goto do_stall; | 1843 | goto do_stall; |
1847 | if (dev->is_selfpowered) | 1844 | if (dev->gadget.is_selfpowered) |
1848 | status = (1 << USB_DEVICE_SELF_POWERED); | 1845 | status = (1 << USB_DEVICE_SELF_POWERED); |
1849 | 1846 | ||
1850 | /* don't bother with a request object! */ | 1847 | /* don't bother with a request object! */ |