diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-23 15:38:08 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2023-01-23 15:38:08 +0100 |
commit | e3e9fc7fa7ad221cc2e7b207d514cc84ed393251 (patch) | |
tree | 7de34df1844075bd3ed0391546d74ae9dab5fcae /drivers/usb/typec/tcpm/tcpm.c | |
parent | dd2f003e4e85b154754d5a83e0c3b1b517d1f802 (diff) | |
parent | 2241ab53cbb5cdb08a6b2d4688feb13971058f65 (diff) |
Merge 6.2-rc5 into usb-next
We need the USB fixes in here and this resolves merge conflicts as
reported in linux-next in the following files:
drivers/usb/host/xhci.c
drivers/usb/host/xhci.h
drivers/usb/typec/ucsi/ucsi.c
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/typec/tcpm/tcpm.c')
-rw-r--r-- | drivers/usb/typec/tcpm/tcpm.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index c624747f32df..5928461b3fad 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -4620,14 +4620,13 @@ static void run_state_machine(struct tcpm_port *port) tcpm_set_state(port, ready_state(port), 0); break; case DR_SWAP_CHANGE_DR: - if (port->data_role == TYPEC_HOST) { - tcpm_unregister_altmodes(port); + tcpm_unregister_altmodes(port); + if (port->data_role == TYPEC_HOST) tcpm_set_roles(port, true, port->pwr_role, TYPEC_DEVICE); - } else { + else tcpm_set_roles(port, true, port->pwr_role, TYPEC_HOST); - } tcpm_ams_finish(port); tcpm_set_state(port, ready_state(port), 0); break; |