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>
This commit is contained in:
parent
2320c03087
commit
21552aee3f
|
@ -1378,7 +1378,7 @@ enum ec_image google_chromeec_get_current_image(void)
|
||||||
|
|
||||||
int google_chromeec_get_num_pd_ports(unsigned int *num_ports)
|
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 = {
|
struct chromeec_command cmd = {
|
||||||
.cmd_code = EC_CMD_USB_PD_PORTS,
|
.cmd_code = EC_CMD_USB_PD_PORTS,
|
||||||
.cmd_version = 0,
|
.cmd_version = 0,
|
||||||
|
@ -1393,7 +1393,7 @@ int google_chromeec_get_num_pd_ports(unsigned int *num_ports)
|
||||||
if (rv)
|
if (rv)
|
||||||
return rv;
|
return rv;
|
||||||
|
|
||||||
*num_ports = resp.port_count;
|
*num_ports = resp.num_ports;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue