diff options
author | Randall Spangler <rspangler@chromium.org> | 2013-10-23 11:25:11 -0700 |
---|---|---|
committer | chrome-internal-fetch <chrome-internal-fetch@google.com> | 2013-10-23 23:53:23 +0000 |
commit | 251a80add32509d258ada5dd5744371f50253b43 (patch) | |
tree | b5ac83771fcdbfd81705309fa3eefbbd185890cd /include/throttle_ap.h | |
parent | 2ad076f8a02c8a3165a76dfb093cefd79fdbfc67 (diff) | |
download | chrome-ec-251a80add32509d258ada5dd5744371f50253b43.tar.gz |
throttle_ap.c should only be compiled if there's a chipset/power task
It doesn't need to be compiled if there would be nothing for it to talk to.
BUG=chrome-os-partner:20739
BRANCH=none
TEST=build all platforms, pass unit tests
comment out chipset task in Rambi ec.tasklist; code still compiles
Change-Id: I004364b8c1fdf02c420162b5ad2843068a26b452
Signed-off-by: Randall Spangler <rspangler@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/174302
Diffstat (limited to 'include/throttle_ap.h')
-rw-r--r-- | include/throttle_ap.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/include/throttle_ap.h b/include/throttle_ap.h index e66a5c6bec..54a4b9fc40 100644 --- a/include/throttle_ap.h +++ b/include/throttle_ap.h @@ -33,7 +33,6 @@ enum throttle_sources { THROTTLE_SRC_POWER, }; - /** * Enable/disable CPU throttling. * @@ -44,8 +43,16 @@ enum throttle_sources { * @param type Type of throttling desired * @param source Which task is requesting throttling */ +#ifdef HAS_TASK_CHIPSET void throttle_ap(enum throttle_level level, enum throttle_type type, enum throttle_sources source); +#else +static inline void throttle_ap(enum throttle_level level, + enum throttle_type type, + enum throttle_sources source) +{} +#endif + #endif /* __CROS_EC_THROTTLE_AP_H */ |