Loading drivers/usb/gadget/function/f_mass_storage.c +7 −1 Original line number Original line Diff line number Diff line Loading @@ -2290,8 +2290,11 @@ static int do_set_interface(struct fsg_common *common, struct fsg_dev *new_fsg) } } common->running = 0; common->running = 0; if (!new_fsg || rc) if (!new_fsg || rc) { /* allow usb LPM after eps are disabled */ usb_gadget_autopm_put_async(common->gadget); return rc; return rc; } common->fsg = new_fsg; common->fsg = new_fsg; fsg = common->fsg; fsg = common->fsg; Loading Loading @@ -2334,6 +2337,9 @@ static int do_set_interface(struct fsg_common *common, struct fsg_dev *new_fsg) bh->outreq->complete = bulk_out_complete; bh->outreq->complete = bulk_out_complete; } } /* prevents usb LPM until thread runs to completion */ usb_gadget_autopm_get_noresume(common->gadget); common->running = 1; common->running = 1; for (i = 0; i < ARRAY_SIZE(common->luns); ++i) for (i = 0; i < ARRAY_SIZE(common->luns); ++i) if (common->luns[i]) if (common->luns[i]) Loading Loading
drivers/usb/gadget/function/f_mass_storage.c +7 −1 Original line number Original line Diff line number Diff line Loading @@ -2290,8 +2290,11 @@ static int do_set_interface(struct fsg_common *common, struct fsg_dev *new_fsg) } } common->running = 0; common->running = 0; if (!new_fsg || rc) if (!new_fsg || rc) { /* allow usb LPM after eps are disabled */ usb_gadget_autopm_put_async(common->gadget); return rc; return rc; } common->fsg = new_fsg; common->fsg = new_fsg; fsg = common->fsg; fsg = common->fsg; Loading Loading @@ -2334,6 +2337,9 @@ static int do_set_interface(struct fsg_common *common, struct fsg_dev *new_fsg) bh->outreq->complete = bulk_out_complete; bh->outreq->complete = bulk_out_complete; } } /* prevents usb LPM until thread runs to completion */ usb_gadget_autopm_get_noresume(common->gadget); common->running = 1; common->running = 1; for (i = 0; i < ARRAY_SIZE(common->luns); ++i) for (i = 0; i < ARRAY_SIZE(common->luns); ++i) if (common->luns[i]) if (common->luns[i]) Loading