diff options
Diffstat (limited to 'driver/ppc/aoz1380.c')
-rw-r--r-- | driver/ppc/aoz1380.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/driver/ppc/aoz1380.c b/driver/ppc/aoz1380.c index 9ce5b442ac..4e2188c60d 100644 --- a/driver/ppc/aoz1380.c +++ b/driver/ppc/aoz1380.c @@ -37,17 +37,12 @@ static uint32_t flags[CONFIG_USB_PD_PORT_MAX_COUNT]; static int aoz1380_init(int port) { - int rv; - bool is_sinking, is_sourcing; - flags[port] = 0; - rv = tcpm_get_snk_ctrl(port, &is_sinking); - if (rv == EC_SUCCESS && is_sinking) + if (tcpm_get_snk_ctrl(port)) AOZ1380_SET_FLAG(port, AOZ1380_FLAGS_SINK_ENABLED); - rv = tcpm_get_src_ctrl(port, &is_sourcing); - if (rv == EC_SUCCESS && is_sourcing) + if (tcpm_get_src_ctrl(port)) AOZ1380_SET_FLAG(port, AOZ1380_FLAGS_SOURCE_ENABLED); return EC_SUCCESS; |