usb: gadget: at91_udc: fix endpoint descriptor dereference
authorNicolas Ferre <nicolas.ferre@atmel.com>
Wed, 16 May 2012 08:23:07 +0000 (10:23 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 May 2012 12:29:20 +0000 (05:29 -0700)
The patch 5a6506f (Update at91_udc to use usb_endpoint_descriptor inside the
struct usb_ep) removes the desc field of struct at91_ep. This convertion had
not been completed which leads to a compilation error.

Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Acked-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/at91_udc.c

index 43943aa965dc71d33ba8341e082f90410de85059..1a4430f315c3ea63805b3e3db16932c7d085c453 100644 (file)
@@ -475,7 +475,7 @@ static int at91_ep_enable(struct usb_ep *_ep,
        unsigned long   flags;
 
        if (!_ep || !ep
-                       || !desc || ep->desc
+                       || !desc || ep->ep.desc
                        || _ep->name == ep0name
                        || desc->bDescriptorType != USB_DT_ENDPOINT
                        || (maxpacket = usb_endpoint_maxp(desc)) == 0