]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
usb: gadget: zero: fix bug in loopback autoresume handling
authorTimo Juhani Lindfors <timo.lindfors@iki.fi>
Sun, 29 Jan 2012 14:12:13 +0000 (16:12 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 13 Feb 2012 19:28:50 +0000 (11:28 -0800)
commit 683da59d7b8ae04891636d4b59893cd4e9b0b7e5 upstream.

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.

Signed-off-by: Timo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/gadget/f_loopback.c

index 6cb29d3df575b3757abb639de812d0cd42eb8daf..8b4dbfc11bcf67841c236258c26ff4c9e2c4141c 100644 (file)
@@ -373,7 +373,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)) {