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

Commit 0eb19131 authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: f_mass_storage: Perform async runtime resume upon set_alt" into msm-4.9

parents c731b7c8 8c87f5fe
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2337,9 +2337,6 @@ static int do_set_interface(struct fsg_common *common, struct fsg_dev *new_fsg)
		bh->outreq->complete = bulk_out_complete;
	}

	/* prevents usb LPM until thread runs to completion */
	usb_gadget_autopm_get_noresume(common->gadget);

	common->running = 1;
	for (i = 0; i < ARRAY_SIZE(common->luns); ++i)
		if (common->luns[i])
@@ -2355,6 +2352,10 @@ static int fsg_set_alt(struct usb_function *f, unsigned intf, unsigned alt)
{
	struct fsg_dev *fsg = fsg_from_func(f);
	fsg->common->new_fsg = fsg;

	/* prevents usb LPM until thread runs to completion */
	usb_gadget_autopm_get_async(fsg->common->gadget);

	raise_exception(fsg->common, FSG_STATE_CONFIG_CHANGE);
	return USB_GADGET_DELAYED_STATUS;
}