Browse Source

usb: gadget: zero: fix bug in loopback autoresume handling

ab943a2e125b (USB: gadget: gadget zero uses new suspend/resume hooks)
introduced a copy-paste error where f_loopback.c writes to a variable
declared in f_sourcesink.c. This prevents one from creating gadgets
that only have a loopback function.

Cc: stable <stable@vger.kernel.org>
Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Timo Juhani Lindfors 13 years ago
parent
commit
683da59d7b
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/usb/gadget/f_loopback.c

+ 1 - 1
drivers/usb/gadget/f_loopback.c

@@ -418,7 +418,7 @@ int __init loopback_add(struct usb_composite_dev *cdev, bool autoresume)
 
 	/* support autoresume for remote wakeup testing */
 	if (autoresume)
-		sourcesink_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
+		loopback_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
 
 	/* support OTG systems */
 	if (gadget_is_otg(cdev->gadget)) {