mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-12 19:04:59 +00:00
usb_mux: Simplify logging to reduce code size
BUG=none BRANCH=none TEST=make buildall Change-Id: Ib2d9476e4740527ad2e1f73eeecb0306140b3f38 Signed-off-by: Philip Chen <philipchen@google.com> Reviewed-on: https://chromium-review.googlesource.com/1025118 Commit-Ready: Philip Chen <philipchen@chromium.org> Tested-by: Philip Chen <philipchen@chromium.org> Reviewed-by: Nicolas Boichat <drinkcat@chromium.org>
This commit is contained in:
@@ -24,7 +24,7 @@ void usb_mux_init(int port)
|
||||
ASSERT(port >= 0 && port < CONFIG_USB_PD_PORT_COUNT);
|
||||
res = mux->driver->init(mux->port_addr);
|
||||
if (res)
|
||||
CPRINTS("Error initializing mux port(%d): %d", port, res);
|
||||
CPRINTS("Err: init mux port(%d): %d", port, res);
|
||||
|
||||
/* Apply board specific initialization */
|
||||
if (mux->board_init)
|
||||
@@ -51,7 +51,7 @@ void usb_mux_set(int port, enum typec_mux mux_mode,
|
||||
mux_state = polarity ? mux_mode | MUX_POLARITY_INVERTED : mux_mode;
|
||||
res = mux->driver->set(mux->port_addr, mux_state);
|
||||
if (res) {
|
||||
CPRINTS("Error setting mux port(%d): %d", port, res);
|
||||
CPRINTS("Err: set mux port(%d): %d", port, res);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -70,7 +70,7 @@ int usb_mux_get(int port, const char **dp_str, const char **usb_str)
|
||||
|
||||
res = mux->driver->get(mux->port_addr, &mux_state);
|
||||
if (res) {
|
||||
CPRINTS("Error getting mux port(%d): %d", port, res);
|
||||
CPRINTS("Err: get mux port(%d): %d", port, res);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -91,7 +91,7 @@ void usb_mux_flip(int port)
|
||||
|
||||
res = mux->driver->get(mux->port_addr, &mux_state);
|
||||
if (res) {
|
||||
CPRINTS("Error getting mux port(%d): %d", port, res);
|
||||
CPRINTS("Err: get mux port(%d): %d", port, res);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ void usb_mux_flip(int port)
|
||||
|
||||
res = mux->driver->set(mux->port_addr, mux_state);
|
||||
if (res)
|
||||
CPRINTS("Error setting mux port(%d): %d", port, res);
|
||||
CPRINTS("Err: set mux port(%d): %d", port, res);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_CMD_TYPEC
|
||||
|
||||
Reference in New Issue
Block a user