summaryrefslogtreecommitdiff
path: root/driver/tcpm/anx7447.c
diff options
context:
space:
mode:
Diffstat (limited to 'driver/tcpm/anx7447.c')
-rw-r--r--driver/tcpm/anx7447.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/driver/tcpm/anx7447.c b/driver/tcpm/anx7447.c
index 954e2a82d7..c21b4cdf2f 100644
--- a/driver/tcpm/anx7447.c
+++ b/driver/tcpm/anx7447.c
@@ -1,4 +1,4 @@
-/* Copyright 2018 The Chromium OS Authors. All rights reserved.
+/* Copyright 2018 The ChromiumOS Authors
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
@@ -286,7 +286,7 @@ DECLARE_CONSOLE_COMMAND(anx_ocm, command_anx_ocm, "port [erase]",
static int anx7447_init(int port)
{
int rv, reg, i;
- const struct usb_mux *me = &usb_muxes[port];
+ const struct usb_mux_chain *me = &usb_muxes[port];
bool unused;
ASSERT(port < CONFIG_USB_PD_PORT_MAX_COUNT);
@@ -384,15 +384,15 @@ static int anx7447_init(int port)
* Run mux_set() here for considering CCD(Case-Closed Debugging) case
* If this TCPC is not also the MUX then don't initialize to NONE
*/
- while ((me != NULL) && (me->driver != &anx7447_usb_mux_driver))
- me = me->next_mux;
+ while ((me != NULL) && (me->mux->driver != &anx7447_usb_mux_driver))
+ me = me->next;
/*
* Note that bypassing the usb_mux API is okay for internal driver calls
* since the task calling init already holds this port's mux lock.
*/
- if (me != NULL && !(me->flags & USB_MUX_FLAG_NOT_TCPC))
- rv = anx7447_mux_set(me, USB_PD_MUX_NONE, &unused);
+ if (me != NULL && !(me->mux->flags & USB_MUX_FLAG_NOT_TCPC))
+ rv = anx7447_mux_set(me->mux, USB_PD_MUX_NONE, &unused);
#endif /* CONFIG_USB_PD_TCPM_MUX */
return rv;
@@ -631,7 +631,7 @@ static int anx7447_mux_init(const struct usb_mux *me)
const uint16_t tcpc_i2c_addr =
I2C_STRIP_FLAGS(tcpc_config[me->usb_port].i2c_info.addr_flags);
const uint16_t mux_i2c_addr =
- I2C_STRIP_FLAGS(usb_muxes[port].i2c_addr_flags);
+ I2C_STRIP_FLAGS(usb_muxes[port].mux->i2c_addr_flags);
/*
* find corresponding anx7447 SPI address according to
@@ -650,7 +650,7 @@ static int anx7447_mux_init(const struct usb_mux *me)
}
if (!I2C_STRIP_FLAGS(anx[port].i2c_addr_flags)) {
ccprintf("TCPC I2C addr 0x%x is invalid for ANX7447\n",
- I2C_STRIP_FLAGS(usb_muxes[port].i2c_addr_flags));
+ I2C_STRIP_FLAGS(usb_muxes[port].mux->i2c_addr_flags));
return EC_ERROR_UNKNOWN;
}