diff options
author | Kyle Tso <[email protected]> | 2024-03-11 22:45:00 +0800 |
---|---|---|
committer | Greg Kroah-Hartman <[email protected]> | 2024-03-26 11:00:35 +0100 |
commit | 893cd9469c68a89a34956121685617dbb37497b1 (patch) | |
tree | 6f0b8d12933068df105fa689a8e47a09705b4da9 | |
parent | cd5432c712351a3d5f82512908f5febfca946ca6 (diff) |
usb: typec: tcpm: Correct port source pdo array in pd_set callback
In tcpm_pd_set, the array of port source capabilities is port->src_pdo,
not port->snk_pdo.
Fixes: cd099cde4ed2 ("usb: typec: tcpm: Support multiple capabilities")
Cc: [email protected]
Signed-off-by: Kyle Tso <[email protected]>
Acked-by: Heikki Krogerus <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r-- | drivers/usb/typec/tcpm/tcpm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index ae2b6c94482d..d63a36b13549 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -6861,7 +6861,7 @@ static int tcpm_pd_set(struct typec_port *p, struct usb_power_delivery *pd) if (data->source_desc.pdo[0]) { for (i = 0; i < PDO_MAX_OBJECTS && data->source_desc.pdo[i]; i++) - port->snk_pdo[i] = data->source_desc.pdo[i]; + port->src_pdo[i] = data->source_desc.pdo[i]; port->nr_src_pdo = i + 1; } |