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

Commit 1afd40d2 authored by Jack Pham's avatar Jack Pham
Browse files

usb: pd: avoid missed connection notification



In the disconnect handler of usbpd_sm(), pd->current_pr is
already set to PR_NONE, so there is no reason to set it again.
This helps for cases where a quick reconnection notification
just arrived and sets the variable to either PR_SRC or PR_SINK
but the disconnect handling clears it resulting in nothing to
be done the next time work is scheduled.

Change-Id: Ia88520149905989a3b3efb94361670760b79c0bd
Signed-off-by: default avatarJack Pham <jackp@codeaurora.org>
parent 8e822907
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -1604,7 +1604,6 @@ static void usbpd_sm(struct work_struct *w)
		else if (pd->current_dr == DR_DFP)
			stop_usb_host(pd);

		pd->current_pr = PR_NONE;
		pd->current_dr = DR_NONE;

		if (pd->current_state == PE_ERROR_RECOVERY)