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

Commit 17e52d98 authored by Jack Pham's avatar Jack Pham Committed by Gerrit - the friendly Code Review server
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 486b948c
Loading
Loading
Loading
Loading
+0 −1
Original line number Original line Diff line number Diff line
@@ -1617,7 +1617,6 @@ static void usbpd_sm(struct work_struct *w)
		else if (pd->current_dr == DR_DFP)
		else if (pd->current_dr == DR_DFP)
			stop_usb_host(pd);
			stop_usb_host(pd);


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


		reset_vdm_state(pd);
		reset_vdm_state(pd);