diff options
Diffstat (limited to 'drivers/usb/gadget/dbgp.c')
-rw-r--r-- | drivers/usb/gadget/dbgp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/usb/gadget/dbgp.c b/drivers/usb/gadget/dbgp.c index e5ac8a316fec..dbe92ee88477 100644 --- a/drivers/usb/gadget/dbgp.c +++ b/drivers/usb/gadget/dbgp.c | |||
@@ -261,8 +261,8 @@ static int __init dbgp_configure_endpoints(struct usb_gadget *gadget) | |||
261 | o_desc.wMaxPacketSize = | 261 | o_desc.wMaxPacketSize = |
262 | __constant_cpu_to_le16(USB_DEBUG_MAX_PACKET_SIZE); | 262 | __constant_cpu_to_le16(USB_DEBUG_MAX_PACKET_SIZE); |
263 | 263 | ||
264 | dbg_desc.bDebugInEndpoint = i_desc.bEndpointAddress & 0x7f; | 264 | dbg_desc.bDebugInEndpoint = i_desc.bEndpointAddress; |
265 | dbg_desc.bDebugOutEndpoint = o_desc.bEndpointAddress & 0x7f; | 265 | dbg_desc.bDebugOutEndpoint = o_desc.bEndpointAddress; |
266 | 266 | ||
267 | #ifdef CONFIG_USB_G_DBGP_SERIAL | 267 | #ifdef CONFIG_USB_G_DBGP_SERIAL |
268 | dbgp.serial->in = dbgp.i_ep; | 268 | dbgp.serial->in = dbgp.i_ep; |
@@ -312,6 +312,7 @@ static int __init dbgp_bind(struct usb_gadget *gadget) | |||
312 | 312 | ||
313 | dbgp.req->length = DBGP_REQ_EP0_LEN; | 313 | dbgp.req->length = DBGP_REQ_EP0_LEN; |
314 | gadget->ep0->driver_data = gadget; | 314 | gadget->ep0->driver_data = gadget; |
315 | device_desc.bMaxPacketSize0 = gadget->ep0->maxpacket; | ||
315 | 316 | ||
316 | #ifdef CONFIG_USB_G_DBGP_SERIAL | 317 | #ifdef CONFIG_USB_G_DBGP_SERIAL |
317 | dbgp.serial = kzalloc(sizeof(struct gserial), GFP_KERNEL); | 318 | dbgp.serial = kzalloc(sizeof(struct gserial), GFP_KERNEL); |
@@ -350,9 +351,9 @@ static int dbgp_setup(struct usb_gadget *gadget, | |||
350 | u8 request = ctrl->bRequest; | 351 | u8 request = ctrl->bRequest; |
351 | u16 value = le16_to_cpu(ctrl->wValue); | 352 | u16 value = le16_to_cpu(ctrl->wValue); |
352 | u16 length = le16_to_cpu(ctrl->wLength); | 353 | u16 length = le16_to_cpu(ctrl->wLength); |
353 | int err = 0; | 354 | int err = -EOPNOTSUPP; |
354 | void *data; | 355 | void *data = NULL; |
355 | u16 len; | 356 | u16 len = 0; |
356 | 357 | ||
357 | gadget->ep0->driver_data = gadget; | 358 | gadget->ep0->driver_data = gadget; |
358 | 359 | ||
@@ -371,10 +372,9 @@ static int dbgp_setup(struct usb_gadget *gadget, | |||
371 | default: | 372 | default: |
372 | goto fail; | 373 | goto fail; |
373 | } | 374 | } |
375 | err = 0; | ||
374 | } else if (request == USB_REQ_SET_FEATURE && | 376 | } else if (request == USB_REQ_SET_FEATURE && |
375 | value == USB_DEVICE_DEBUG_MODE) { | 377 | value == USB_DEVICE_DEBUG_MODE) { |
376 | len = 0; | ||
377 | data = NULL; | ||
378 | dev_dbg(&dbgp.gadget->dev, "setup: feat debug\n"); | 378 | dev_dbg(&dbgp.gadget->dev, "setup: feat debug\n"); |
379 | #ifdef CONFIG_USB_G_DBGP_PRINTK | 379 | #ifdef CONFIG_USB_G_DBGP_PRINTK |
380 | err = dbgp_enable_ep(); | 380 | err = dbgp_enable_ep(); |