Skip to content

Commit 290a405

Browse files
amaramadgregkh
authored andcommitted
usb: typec: intel_pmc_mux: Un-register the USB role switch
Added missing code for un-register USB role switch in the remove and error path. Cc: Stable <stable@vger.kernel.org> # v5.8 Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Fixes: 6701adf ("usb: typec: driver for Intel PMC mux control") Signed-off-by: Madhusudanarao Amara <madhusudanarao.amara@intel.com> Link: https://lore.kernel.org/r/20200825183811.7262-1-madhusudanarao.amara@intel.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent cfd54fa commit 290a405

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

drivers/usb/typec/mux/intel_pmc_mux.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -497,6 +497,7 @@ static int pmc_usb_probe(struct platform_device *pdev)
497497
for (i = 0; i < pmc->num_ports; i++) {
498498
typec_switch_unregister(pmc->port[i].typec_sw);
499499
typec_mux_unregister(pmc->port[i].typec_mux);
500+
usb_role_switch_unregister(pmc->port[i].usb_sw);
500501
}
501502

502503
return ret;
@@ -510,6 +511,7 @@ static int pmc_usb_remove(struct platform_device *pdev)
510511
for (i = 0; i < pmc->num_ports; i++) {
511512
typec_switch_unregister(pmc->port[i].typec_sw);
512513
typec_mux_unregister(pmc->port[i].typec_mux);
514+
usb_role_switch_unregister(pmc->port[i].usb_sw);
513515
}
514516

515517
return 0;

0 commit comments

Comments
 (0)