summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chip/g/usb.c9
-rw-r--r--common/hooks.c2
-rw-r--r--core/cortex-m/ec.lds.S2
-rw-r--r--include/hooks.h2
-rw-r--r--include/link_defs.h2
5 files changed, 7 insertions, 10 deletions
diff --git a/chip/g/usb.c b/chip/g/usb.c
index 03e26bf589..6adb193128 100644
--- a/chip/g/usb.c
+++ b/chip/g/usb.c
@@ -29,10 +29,7 @@
#define CPRINTS(format, args...) cprints(CC_USB, format, ## args)
#define CPRINTF(format, args...) cprintf(CC_USB, format, ## args)
-#define USE_SERIAL_NUMBER (defined(CONFIG_USB_SERIALNO) && \
- defined(CONFIG_CASE_CLOSED_DEBUG))
-
-#if !USE_SERIAL_NUMBER
+#ifndef CONFIG_USB_SERIALNO
#define USB_STR_SERIALNO 0
#endif
@@ -611,7 +608,7 @@ static int handle_setup_with_in_stage(enum table_case tc,
case USB_DT_STRING:
if (idx >= USB_STR_COUNT)
return -1;
-#if USE_SERIAL_NUMBER
+#ifdef CONFIG_USB_SERIALNO
if (idx == USB_STR_SERIALNO &&
ccd_get_mode() == CCD_MODE_ENABLED)
data = usb_serialno_desc;
@@ -1434,7 +1431,7 @@ DECLARE_CONSOLE_COMMAND(usb, command_usb,
#endif
"Get/set the USB connection state and PHY selection");
-#if USE_SERIAL_NUMBER
+#ifdef CONFIG_USB_SERIALNO
/* This will be subbed into USB_STR_SERIALNO. */
struct usb_string_desc *usb_serialno_desc =
USB_WR_STRING_DESC(DEFAULT_SERIALNO);
diff --git a/common/hooks.c b/common/hooks.c
index 27ee1c422f..d83c7a36c8 100644
--- a/common/hooks.c
+++ b/common/hooks.c
@@ -47,7 +47,7 @@ static const struct hook_ptrs hook_list[] = {
{__hooks_tablet_mode_change, __hooks_tablet_mode_change_end},
{__hooks_pwrbtn_change, __hooks_pwrbtn_change_end},
{__hooks_battery_soc_change, __hooks_battery_soc_change_end},
-#ifdef CONFIG_CASE_CLOSED_DEBUG
+#ifdef CONFIG_CASE_CLOSED_DEBUG_V1
{__hooks_ccd_change, __hooks_ccd_change_end},
#endif
{__hooks_tick, __hooks_tick_end},
diff --git a/core/cortex-m/ec.lds.S b/core/cortex-m/ec.lds.S
index c530012e1f..80b2072834 100644
--- a/core/cortex-m/ec.lds.S
+++ b/core/cortex-m/ec.lds.S
@@ -198,7 +198,7 @@ SECTIONS
KEEP(*(.rodata.HOOK_BATTERY_SOC_CHANGE))
__hooks_battery_soc_change_end = .;
-#ifdef CONFIG_CASE_CLOSED_DEBUG
+#ifdef CONFIG_CASE_CLOSED_DEBUG_V1
__hooks_ccd_change = .;
KEEP(*(.rodata.HOOK_CCD_CHANGE))
__hooks_ccd_change_end = .;
diff --git a/include/hooks.h b/include/hooks.h
index 296026fe3e..04206efde7 100644
--- a/include/hooks.h
+++ b/include/hooks.h
@@ -162,7 +162,7 @@ enum hook_type {
*/
HOOK_BATTERY_SOC_CHANGE,
-#ifdef CONFIG_CASE_CLOSED_DEBUG
+#ifdef CONFIG_CASE_CLOSED_DEBUG_V1
/*
* Case-closed debugging configuration changed.
*
diff --git a/include/link_defs.h b/include/link_defs.h
index 262a149772..9e621ebce7 100644
--- a/include/link_defs.h
+++ b/include/link_defs.h
@@ -54,7 +54,7 @@ extern const struct hook_data __hooks_pwrbtn_change[];
extern const struct hook_data __hooks_pwrbtn_change_end[];
extern const struct hook_data __hooks_battery_soc_change[];
extern const struct hook_data __hooks_battery_soc_change_end[];
-#ifdef CONFIG_CASE_CLOSED_DEBUG
+#ifdef CONFIG_CASE_CLOSED_DEBUG_V1
extern const struct hook_data __hooks_ccd_change[];
extern const struct hook_data __hooks_ccd_change_end[];
#endif