summaryrefslogtreecommitdiff
path: root/chip/lm4/hwtimer.c
diff options
context:
space:
mode:
authorRandall Spangler <rspangler@chromium.org>2012-10-23 14:12:25 -0700
committerGerrit <chrome-bot@google.com>2012-10-23 16:49:29 -0700
commite72788ef96e83ef9d6ac0b2593c7edd8139c9376 (patch)
tree8eab899042c277b835310e9c35d9ee8180b14837 /chip/lm4/hwtimer.c
parent7cd4d4391d3abbd2272bf9b7459677a4fa99cd0c (diff)
downloadchrome-ec-e72788ef96e83ef9d6ac0b2593c7edd8139c9376.tar.gz
Hook functions no longer return values
Previously, all hook functions returned EC_SUCCESS, which was meaningless because nothing ever looked at the return value. Changing the return value to void saves ~100 bytes of code size and an equal amount of source code size. BUG=none BRANCH=none TEST=code still builds; link still boots Change-Id: I2a636339894e5a804831244967a9c9d134df7d13 Signed-off-by: Randall Spangler <rspangler@chromium.org> Reviewed-on: https://gerrit.chromium.org/gerrit/36372
Diffstat (limited to 'chip/lm4/hwtimer.c')
-rw-r--r--chip/lm4/hwtimer.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/chip/lm4/hwtimer.c b/chip/lm4/hwtimer.c
index 9c23cbf961..45166f2194 100644
--- a/chip/lm4/hwtimer.c
+++ b/chip/lm4/hwtimer.c
@@ -64,13 +64,11 @@ static void __hw_clock_source_irq(void)
DECLARE_IRQ(LM4_IRQ_TIMERW0A, __hw_clock_source_irq, 1);
-static int update_prescaler(void)
+static void update_prescaler(void)
{
/* Set the prescaler to increment every microsecond. This takes
* effect immediately, because the TAILD bit in TAMR is clear. */
LM4_TIMER_TAPR(6) = clock_get_freq() / US_PER_SECOND;
-
- return EC_SUCCESS;
}
DECLARE_HOOK(HOOK_FREQ_CHANGE, update_prescaler, HOOK_PRIO_DEFAULT);