diff --git a/common/main.c b/common/main.c index bf27cae30f..79533b9411 100644 --- a/common/main.c +++ b/common/main.c @@ -25,7 +25,9 @@ #include "pwm_commands.h" #include "system.h" #include "task.h" +#ifdef CONFIG_TEMP_SENSOR #include "temp_sensor.h" +#endif #include "timer.h" #include "uart.h" #include "vboot.h" @@ -81,7 +83,9 @@ int main(void) power_button_init(); adc_init(); usb_charge_init(); +#ifdef CONFIG_CHARGER charger_init(); +#endif /* Print the reset cause */ uart_printf("\n\n--- Chrome EC initialized! ---\n"); diff --git a/include/temp_sensor.h b/include/temp_sensor.h index b5441de01d..df937112e1 100644 --- a/include/temp_sensor.h +++ b/include/temp_sensor.h @@ -11,9 +11,6 @@ #include "common.h" #include "board.h" -/* forward declaration */ -enum temp_sensor_id; - /* "enum temp_sensor_id" must be defined for each board in board.h. */ struct temp_sensor_t { const char* name;