diff options
author | Caveh Jalali <caveh@chromium.org> | 2022-11-02 18:59:36 -0700 |
---|---|---|
committer | Martin L Roth <gaumless@gmail.com> | 2022-11-10 15:10:25 +0000 |
commit | 21552aee3f9dbbb5c7bc1417f245a82b0fa8943d (patch) | |
tree | db0ef45232ff76f9e2c33aff5f3b55b540a141b3 /src/ec/google/chromeec | |
parent | 2320c03087bd46f752966793d652ccd9a0870324 (diff) |
ec/google/chromeec: Fix USB_PD_PORTS response data type
The EC_CMD_USB_PD_PORTS host command returns a
struct ec_response_usb_pd_ports, not a
struct ec_response_charge_port_count.
Luckily, both structs have the same memory layout, so this is simply a
name change.
BUG=b:258126464
BRANCH=none
TEST=none
Change-Id: I0d7710ca8a45f0ea3939f58bbba6bab31ff41919
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69370
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/ec/google/chromeec')
-rw-r--r-- | src/ec/google/chromeec/ec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/ec/google/chromeec/ec.c b/src/ec/google/chromeec/ec.c index 3afe840d53..01f9ff476b 100644 --- a/src/ec/google/chromeec/ec.c +++ b/src/ec/google/chromeec/ec.c @@ -1378,7 +1378,7 @@ enum ec_image google_chromeec_get_current_image(void) int google_chromeec_get_num_pd_ports(unsigned int *num_ports) { - struct ec_response_charge_port_count resp = {}; + struct ec_response_usb_pd_ports resp = {}; struct chromeec_command cmd = { .cmd_code = EC_CMD_USB_PD_PORTS, .cmd_version = 0, @@ -1393,7 +1393,7 @@ int google_chromeec_get_num_pd_ports(unsigned int *num_ports) if (rv) return rv; - *num_ports = resp.port_count; + *num_ports = resp.num_ports; return 0; } |