summaryrefslogtreecommitdiffstats
path: root/drivers/usb/gadget/at91_udc.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-11 13:39:31 -0700
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-09-11 13:39:49 -0700
commit7135f08e47de094f8748507806efa8d7ba27a964 (patch)
tree4e0bd28908a35cb3ce3b44a87402641c959775c7 /drivers/usb/gadget/at91_udc.c
parent73d4066055e0e2830533041f4b91df8e6e5976ff (diff)
parent5c4d46eb89fe99011a02048533857345d9e8b506 (diff)
downloadblackbird-op-linux-7135f08e47de094f8748507806efa8d7ba27a964.tar.gz
blackbird-op-linux-7135f08e47de094f8748507806efa8d7ba27a964.zip
Merge tag 'gadget-for-v3.7' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next
usb: gadget: patches for v3.7 merge window This pull request is large but the biggest part is the first part of the cleanup on the gadget framework so we have a saner setup to add configfs support for v3.8. We have also some more conversions to the new udc_start/udc_stop which makes us closer from dropping the old interfaces. USB_GADGET_DUALSPEED and USB_GADGET_SUPERSPEED are finally gone, thanks to Michal for his awesome work. Other than that, we have the usual set of miscellaneous changes and cleanups involving improvements to debug messages, removal of duplicated includes, moving dereference after NULL test, making renesas_hsbhs' irq handler Shared, unused code being dropped, prevention of sleep-inside-spinlock bugs and a race condition fix on udc-core.
Diffstat (limited to 'drivers/usb/gadget/at91_udc.c')
-rw-r--r--drivers/usb/gadget/at91_udc.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/usb/gadget/at91_udc.c b/drivers/usb/gadget/at91_udc.c
index c9e66dfb02e6..af931282843d 100644
--- a/drivers/usb/gadget/at91_udc.c
+++ b/drivers/usb/gadget/at91_udc.c
@@ -469,7 +469,7 @@ static int at91_ep_enable(struct usb_ep *_ep,
const struct usb_endpoint_descriptor *desc)
{
struct at91_ep *ep = container_of(_ep, struct at91_ep, ep);
- struct at91_udc *udc = ep->udc;
+ struct at91_udc *udc;
u16 maxpacket;
u32 tmp;
unsigned long flags;
@@ -484,6 +484,7 @@ static int at91_ep_enable(struct usb_ep *_ep,
return -EINVAL;
}
+ udc = ep->udc;
if (!udc->driver || udc->gadget.speed == USB_SPEED_UNKNOWN) {
DBG("bogus device state\n");
return -ESHUTDOWN;
@@ -1703,7 +1704,7 @@ static int __devinit at91udc_probe(struct platform_device *pdev)
int retval;
struct resource *res;
- if (!dev->platform_data) {
+ if (!dev->platform_data && !pdev->dev.of_node) {
/* small (so we copy it) but critical! */
DBG("missing platform_data\n");
return -ENODEV;
OpenPOWER on IntegriCloud