From b61bfc8febcf9e897bb5a76f2fbe59b791f9d514 Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Tue, 29 Jul 2014 17:27:05 -0700 Subject: Add more build conditions on x86-only code. ACPI and thermal throttling are used only by x86 platforms. Modify the conditional build to avoid building them where they are not used. Signed-off-by: Vincent Palatin BRANCH=none BUG=none TEST=make buildall check the flash size on Ryu and see we are saving about 200 bytes with this changes. Change-Id: Ie5e1603fb3bea95eaa5cb1e6cb19f4ddb0e235e8 Reviewed-on: https://chromium-review.googlesource.com/210056 Reviewed-by: Vincent Palatin Commit-Queue: Vincent Palatin Tested-by: Vincent Palatin --- common/build.mk | 8 ++++---- include/throttle_ap.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/common/build.mk b/common/build.mk index 4401c570aa..eeb079181c 100644 --- a/common/build.mk +++ b/common/build.mk @@ -51,7 +51,7 @@ common-$(CONFIG_KEYBOARD_TEST)+=keyboard_test.o common-$(CONFIG_LED_COMMON)+=led_common.o common-$(CONFIG_LID_ANGLE_KEY_SCAN)+=lid_angle.o common-$(CONFIG_LID_SWITCH)+=lid_switch.o -common-$(CONFIG_LPC)+=port80.o +common-$(CONFIG_LPC)+=acpi.o port80.o common-$(CONFIG_ONEWIRE)+=onewire.o common-$(CONFIG_POWER_BUTTON)+=power_button.o common-$(CONFIG_POWER_BUTTON_X86)+=power_button_x86.o @@ -63,16 +63,16 @@ common-$(CONFIG_SOFTWARE_CLZ)+=clz.o common-$(CONFIG_SPI_FLASH)+=spi_flash.o common-$(CONFIG_SWITCH)+=switch.o common-$(CONFIG_SW_CRC)+=crc.o -common-$(CONFIG_TEMP_SENSOR)+=temp_sensor.o thermal.o +common-$(CONFIG_TEMP_SENSOR)+=temp_sensor.o thermal.o throttle_ap.o common-$(CONFIG_USB_PORT_POWER_DUMB)+=usb_port_power_dumb.o common-$(CONFIG_USB_PORT_POWER_SMART)+=usb_port_power_smart.o common-$(CONFIG_USB_POWER_DELIVERY)+=usb_pd_protocol.o common-$(CONFIG_VBOOT_HASH)+=sha256.o vboot_hash.o common-$(CONFIG_WIRELESS)+=wireless.o -common-$(HAS_TASK_CHIPSET)+=chipset.o throttle_ap.o +common-$(HAS_TASK_CHIPSET)+=chipset.o common-$(HAS_TASK_CONSOLE)+=console.o console_output.o uart_buffering.o common-$(HAS_TASK_CONSOLE)+=memory_commands.o -common-$(HAS_TASK_HOSTCMD)+=acpi.o host_command.o host_event_commands.o +common-$(HAS_TASK_HOSTCMD)+=host_command.o host_event_commands.o common-$(HAS_TASK_PDCMD)+=host_command_master.o host_command_pd.o common-$(HAS_TASK_KEYSCAN)+=keyboard_scan.o common-$(HAS_TASK_LIGHTBAR)+=lb_common.o lightbar.o diff --git a/include/throttle_ap.h b/include/throttle_ap.h index 54a4b9fc40..8d2af51db9 100644 --- a/include/throttle_ap.h +++ b/include/throttle_ap.h @@ -43,7 +43,7 @@ enum throttle_sources { * @param type Type of throttling desired * @param source Which task is requesting throttling */ -#ifdef HAS_TASK_CHIPSET +#ifdef CONFIG_TEMP_SENSOR void throttle_ap(enum throttle_level level, enum throttle_type type, enum throttle_sources source); -- cgit v1.2.1