usb: typec: tcpm: Update PD of Type-C port upon pd_set
authorKyle Tso <kyletso@google.com>
Mon, 11 Mar 2024 17:23:06 +0000 (01:23 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 26 Mar 2024 10:02:18 +0000 (11:02 +0100)
commit17af5050dead6cbcca12c1fcd17e0bb8bb284eae
tree9fadecd1005dbc4b503095cd2d36a21136a5d0b4
parentb63f90487bdf93a4223ce7853d14717e9d452856
usb: typec: tcpm: Update PD of Type-C port upon pd_set

The PD of Type-C port needs to be updated in pd_set. Unlink the Type-C
port device to the old PD before linking it to a new one.

Fixes: cd099cde4ed2 ("usb: typec: tcpm: Support multiple capabilities")
Cc: stable@vger.kernel.org
Signed-off-by: Kyle Tso <kyletso@google.com>
Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
Link: https://lore.kernel.org/r/20240311172306.3911309-1-kyletso@google.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/usb/typec/tcpm/tcpm.c