Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 683da59d authored by Timo Juhani Lindfors's avatar Timo Juhani Lindfors Committed by Felipe Balbi
Browse files

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



ab943a2e (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: default avatarTimo Juhani Lindfors <timo.lindfors@iki.fi>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent b30b3c60
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -418,7 +418,7 @@ int __init loopback_add(struct usb_composite_dev *cdev, bool autoresume)


	/* support autoresume for remote wakeup testing */
	/* support autoresume for remote wakeup testing */
	if (autoresume)
	if (autoresume)
		sourcesink_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP;
		loopback_driver.bmAttributes |= USB_CONFIG_ATT_WAKEUP;


	/* support OTG systems */
	/* support OTG systems */
	if (gadget_is_otg(cdev->gadget)) {
	if (gadget_is_otg(cdev->gadget)) {