From 873e4425c5e27be3019b0ca47251e6fb94715bd3 Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Mon, 15 Jul 2013 15:51:19 -0700 Subject: Remove unneeded direct includes of board.h and config.h Both of these are included via common.h, which is in turn included by most other header files. Directly including board.h or config.h is redundant and discouraged. No code changes, just removing #includes. This is in preparation for making a top-level config.h file, but that change will be easier to review if it doesn't touch as many files. BUG=chrome-os-partner:18343 BRANCH=none TEST=build all platforms Change-Id: I204bcebe5607c6e6808821eb071cfc31d2a93a7c Signed-off-by: Randall Spangler Reviewed-on: https://gerrit.chromium.org/gerrit/62121 Reviewed-by: Bill Richardson Reviewed-by: Vincent Palatin --- board/bds/board.c | 1 - board/host/board.c | 1 - chip/host/flash.c | 2 +- chip/host/uart.c | 3 +-- chip/lm4/mock_gpio.c | 1 - chip/lm4/mock_lpc.c | 1 - chip/lm4/spi.c | 1 - common/eoption.c | 1 - common/extpower_usb.c | 1 - common/led_driver_lp5562.c | 1 - common/led_falco.c | 1 - common/led_peppy.c | 1 - common/mock_charger.c | 1 - common/temp_sensor_g781.c | 1 - common/usb_switch_tsu6721.c | 1 - include/smart_battery.h | 1 - include/temp_sensor.h | 1 - include/util.h | 1 - test/flash.c | 1 - test/stress.c | 1 - test/thermal.c | 1 - 21 files changed, 2 insertions(+), 22 deletions(-) diff --git a/board/bds/board.c b/board/bds/board.c index d0808f4f37..2794ff06db 100644 --- a/board/bds/board.c +++ b/board/bds/board.c @@ -5,7 +5,6 @@ /* Stellaris EKB-LM4F-EAC board-specific configuration */ #include "adc.h" -#include "board.h" #include "gpio.h" #include "i2c.h" #include "lm4_adc.h" diff --git a/board/host/board.c b/board/host/board.c index 609d29bb84..9e81cf60d3 100644 --- a/board/host/board.c +++ b/board/host/board.c @@ -4,7 +4,6 @@ */ /* Emulator board-specific configuration */ -#include "board.h" #include "gpio.h" #include "temp_sensor.h" diff --git a/chip/host/flash.c b/chip/host/flash.c index 24023c5155..fac8620b38 100644 --- a/chip/host/flash.c +++ b/chip/host/flash.c @@ -7,7 +7,7 @@ #include -#include "config.h" +#include "common.h" #include "flash.h" #include "persistence.h" #include "util.h" diff --git a/chip/host/uart.c b/chip/host/uart.c index dc237c53b1..de2129dbf3 100644 --- a/chip/host/uart.c +++ b/chip/host/uart.c @@ -10,8 +10,7 @@ #include #include -#include "board.h" -#include "config.h" +#include "common.h" #include "queue.h" #include "task.h" #include "uart.h" diff --git a/chip/lm4/mock_gpio.c b/chip/lm4/mock_gpio.c index 600b117465..59c32dc7ce 100644 --- a/chip/lm4/mock_gpio.c +++ b/chip/lm4/mock_gpio.c @@ -5,7 +5,6 @@ /* Mock GPIO module for Chrome EC */ -#include "board.h" #include "console.h" #include "gpio.h" #include "util.h" diff --git a/chip/lm4/mock_lpc.c b/chip/lm4/mock_lpc.c index 0d47239dd7..b4b7164352 100644 --- a/chip/lm4/mock_lpc.c +++ b/chip/lm4/mock_lpc.c @@ -5,7 +5,6 @@ /* Mock LPC module for Chrome EC */ -#include "board.h" #include "common.h" #include "ec_commands.h" #include "lpc.h" diff --git a/chip/lm4/spi.c b/chip/lm4/spi.c index c35a834f8b..7d3b6485d7 100644 --- a/chip/lm4/spi.c +++ b/chip/lm4/spi.c @@ -5,7 +5,6 @@ /* SPI module for Chrome EC */ -#include "board.h" #include "console.h" #include "gpio.h" #include "hooks.h" diff --git a/common/eoption.c b/common/eoption.c index 38c329342e..24879a76e0 100644 --- a/common/eoption.c +++ b/common/eoption.c @@ -5,7 +5,6 @@ /* Persistent EC options stored in EEPROM */ -#include "board.h" #include "console.h" #include "eeprom.h" #include "eoption.h" diff --git a/common/extpower_usb.c b/common/extpower_usb.c index 199bfa1b4d..957ad649b5 100644 --- a/common/extpower_usb.c +++ b/common/extpower_usb.c @@ -6,7 +6,6 @@ /* USB charging control for spring board */ #include "adc.h" -#include "board.h" #include "chipset.h" #include "clock.h" #include "console.h" diff --git a/common/led_driver_lp5562.c b/common/led_driver_lp5562.c index 721be45d41..fd92fae26f 100644 --- a/common/led_driver_lp5562.c +++ b/common/led_driver_lp5562.c @@ -5,7 +5,6 @@ * TI LP5562 driver. */ -#include "board.h" #include "console.h" #include "i2c.h" #include "lp5562.h" diff --git a/common/led_falco.c b/common/led_falco.c index 70382005a5..17398d23e9 100644 --- a/common/led_falco.c +++ b/common/led_falco.c @@ -6,7 +6,6 @@ */ #include "battery.h" -#include "board.h" #include "charge_state.h" #include "chipset.h" #include "extpower.h" diff --git a/common/led_peppy.c b/common/led_peppy.c index 1dc37b02d4..aed913cb72 100644 --- a/common/led_peppy.c +++ b/common/led_peppy.c @@ -6,7 +6,6 @@ */ #include "battery.h" -#include "board.h" #include "charge_state.h" #include "chipset.h" #include "gpio.h" diff --git a/common/mock_charger.c b/common/mock_charger.c index b930835dcd..d1d9659ad8 100644 --- a/common/mock_charger.c +++ b/common/mock_charger.c @@ -5,7 +5,6 @@ * Mock battery charger driver. */ -#include "board.h" #include "charger.h" #include "console.h" #include "common.h" diff --git a/common/temp_sensor_g781.c b/common/temp_sensor_g781.c index 32f29e72f5..d11af27a99 100644 --- a/common/temp_sensor_g781.c +++ b/common/temp_sensor_g781.c @@ -5,7 +5,6 @@ /* G781 temperature sensor module for Chrome EC */ -#include "board.h" #include "common.h" #include "console.h" #include "i2c.h" diff --git a/common/usb_switch_tsu6721.c b/common/usb_switch_tsu6721.c index 6c45f8799c..1eaa74de55 100644 --- a/common/usb_switch_tsu6721.c +++ b/common/usb_switch_tsu6721.c @@ -5,7 +5,6 @@ * TI TSU6721 USB port switch driver. */ -#include "board.h" #include "console.h" #include "ec_commands.h" #include "hooks.h" diff --git a/include/smart_battery.h b/include/smart_battery.h index 3aab43ef91..1db6203692 100644 --- a/include/smart_battery.h +++ b/include/smart_battery.h @@ -8,7 +8,6 @@ #ifndef __CROS_EC_SMART_BATTERY_H #define __CROS_EC_SMART_BATTERY_H -#include "board.h" #include "common.h" #include "i2c.h" #include "smart_battery_stub.h" diff --git a/include/temp_sensor.h b/include/temp_sensor.h index 6ef71952bf..d3532426e6 100644 --- a/include/temp_sensor.h +++ b/include/temp_sensor.h @@ -9,7 +9,6 @@ #define __CROS_EC_TEMP_SENSOR_H #include "common.h" -#include "board.h" /* "enum temp_sensor_id" must be defined for each board in board.h. */ enum temp_sensor_id; diff --git a/include/util.h b/include/util.h index 9db42c2f34..dc9cffdee0 100644 --- a/include/util.h +++ b/include/util.h @@ -10,7 +10,6 @@ #include "common.h" #include "compile_time_macros.h" -#include "config.h" #include "panic.h" /** diff --git a/test/flash.c b/test/flash.c index 73c4a95683..9bc5ddca61 100644 --- a/test/flash.c +++ b/test/flash.c @@ -5,7 +5,6 @@ /* Console commands to trigger flash host commands */ -#include "board.h" #include "console.h" #include "ec_commands.h" #include "flash.h" diff --git a/test/stress.c b/test/stress.c index e1a75f39b1..d5c6f3a901 100644 --- a/test/stress.c +++ b/test/stress.c @@ -5,7 +5,6 @@ /* Peripheral stress tests */ -#include "board.h" #include "console.h" #include "ec_commands.h" #include "i2c.h" diff --git a/test/thermal.c b/test/thermal.c index e047a64486..485e19bfb5 100644 --- a/test/thermal.c +++ b/test/thermal.c @@ -5,7 +5,6 @@ * Test thermal engine. */ -#include "board.h" #include "common.h" #include "console.h" #include "hooks.h" -- cgit v1.2.1