diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 15:33:02 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2011-05-23 15:33:02 -0400 |
commit | c44dead70a841d90ddc01968012f323c33217c9e (patch) | |
tree | 85489ebe9b9a3413cd8ee197ffb40c8aa8d97e63 /drivers/usb/gadget/dbgp.c | |
parent | 99dff5856220a02b8711f2e8746413ea6e53ccf6 (diff) | |
parent | d5f6db9e1aff6ccf1876224f152c0268b0c8a992 (diff) |
Merge branch 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (205 commits)
USB: EHCI: Remove SPARC_LEON {read,write}_be definitions from ehci.h
USB: UHCI: Support big endian GRUSBHC HC
sparc: add {read,write}*_be routines
USB: UHCI: Add support for big endian descriptors
USB: UHCI: Use ACCESS_ONCE rather than using a full compiler barrier
USB: UHCI: Add support for big endian mmio
usb-storage: Correct adjust_quirks to include latest flags
usb/isp1760: Fix possible unlink problems
usb/isp1760: Move function isp1760_endpoint_disable() within file.
USB: remove remaining usages of hcd->state from usbcore and fix regression
usb: musb: ux500: add configuration and build options for ux500 dma
usb: musb: ux500: add dma glue layer for ux500
usb: musb: ux500: add dma name for ux500
usb: musb: ux500: add ux500 specific code for gadget side
usb: musb: fix compile error
usb-storage: fix up the unusual_realtek device list
USB: gadget: f_audio: Fix invalid dereference of initdata
EHCI: don't rescan interrupt QHs needlessly
OHCI: fix regression caused by nVidia shutdown workaround
USB: OTG: msm: Free VCCCX regulator even if we can't set the voltage
...
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(); |