[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200915140701.991598905@linuxfoundation.org>
Date: Tue, 15 Sep 2020 16:14:04 +0200
From: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
To: linux-kernel@...r.kernel.org
Cc: Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
stable@...r.kernel.org,
Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
Madhusudanarao Amara <madhusudanarao.amara@...el.com>
Subject: [PATCH 5.8 173/177] usb: typec: intel_pmc_mux: Un-register the USB role switch
From: Madhusudanarao Amara <madhusudanarao.amara@...el.com>
commit 290a405ce318d036666c4155d5899eb8cd6e0d97 upstream.
Added missing code for un-register USB role switch in the remove and
error path.
Cc: Stable <stable@...r.kernel.org> # v5.8
Reviewed-by: Heikki Krogerus <heikki.krogerus@...ux.intel.com>
Fixes: 6701adfa9693b ("usb: typec: driver for Intel PMC mux control")
Signed-off-by: Madhusudanarao Amara <madhusudanarao.amara@...el.com>
Link: https://lore.kernel.org/r/20200825183811.7262-1-madhusudanarao.amara@intel.com
Signed-off-by: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
---
drivers/usb/typec/mux/intel_pmc_mux.c | 2 ++
1 file changed, 2 insertions(+)
--- a/drivers/usb/typec/mux/intel_pmc_mux.c
+++ b/drivers/usb/typec/mux/intel_pmc_mux.c
@@ -441,6 +441,7 @@ err_remove_ports:
for (i = 0; i < pmc->num_ports; i++) {
typec_switch_unregister(pmc->port[i].typec_sw);
typec_mux_unregister(pmc->port[i].typec_mux);
+ usb_role_switch_unregister(pmc->port[i].usb_sw);
}
return ret;
@@ -454,6 +455,7 @@ static int pmc_usb_remove(struct platfor
for (i = 0; i < pmc->num_ports; i++) {
typec_switch_unregister(pmc->port[i].typec_sw);
typec_mux_unregister(pmc->port[i].typec_mux);
+ usb_role_switch_unregister(pmc->port[i].usb_sw);
}
return 0;
Powered by blists - more mailing lists