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

Commit b0bc63c5 authored by qctecmdr Service's avatar qctecmdr Service Committed by Gerrit - the friendly Code Review server
Browse files

Merge "usb: gadget: f_mass_storage: Perform async runtime resume upon set_alt"

parents 4e20eea4 cc843309
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -2272,9 +2272,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])
@@ -2290,6 +2287,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;
}