summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--board/link/board.h3
-rw-r--r--common/usb_port_power_smart.c5
2 files changed, 4 insertions, 4 deletions
diff --git a/board/link/board.h b/board/link/board.h
index 0986ed20fa..4582500620 100644
--- a/board/link/board.h
+++ b/board/link/board.h
@@ -96,9 +96,6 @@ enum pwm_channel {
/* Host connects to keyboard controller module via LPC */
#define HOST_KB_BUS_LPC
-/* USB charge port */
-#define USB_CHARGE_PORT_COUNT 2
-
/* GPIO signal definitions. */
enum gpio_signal {
/* Inputs with interrupt handlers are first for efficiency */
diff --git a/common/usb_port_power_smart.c b/common/usb_port_power_smart.c
index 369179a6de..dfe7b32d5f 100644
--- a/common/usb_port_power_smart.c
+++ b/common/usb_port_power_smart.c
@@ -21,10 +21,13 @@
#define USB_SYSJUMP_TAG 0x5550 /* "UP" - Usb Port */
#define USB_HOOK_VERSION 1
+#define USB_CHARGE_PORT_COUNT 2
+
/* The previous USB port state before sys jump */
struct usb_state {
uint8_t port_mode[USB_CHARGE_PORT_COUNT];
- uint8_t pad[2]; /* Pad to 4 bytes for system_add_jump_tag(). */
+ /* Pad to 4 bytes for system_add_jump_tag(). */
+ uint8_t pad[4 - USB_CHARGE_PORT_COUNT];
};
static uint8_t charge_mode[USB_CHARGE_PORT_COUNT];