diff options
author | Randall Spangler <rspangler@chromium.org> | 2012-10-23 14:12:25 -0700 |
---|---|---|
committer | Gerrit <chrome-bot@google.com> | 2012-10-23 16:49:29 -0700 |
commit | e72788ef96e83ef9d6ac0b2593c7edd8139c9376 (patch) | |
tree | 8eab899042c277b835310e9c35d9ee8180b14837 /chip/lm4/gpio.c | |
parent | 7cd4d4391d3abbd2272bf9b7459677a4fa99cd0c (diff) | |
download | chrome-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/gpio.c')
-rw-r--r-- | chip/lm4/gpio.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/chip/lm4/gpio.c b/chip/lm4/gpio.c index f5eca38a79..23cedd52c3 100644 --- a/chip/lm4/gpio.c +++ b/chip/lm4/gpio.c @@ -88,8 +88,7 @@ int gpio_pre_init(void) return EC_SUCCESS; } - -static int gpio_init(void) +static void gpio_init(void) { /* Enable IRQs now that pins are set up */ task_enable_irq(LM4_IRQ_GPIOA); @@ -109,12 +108,9 @@ static int gpio_init(void) #endif task_enable_irq(LM4_IRQ_GPIOP); task_enable_irq(LM4_IRQ_GPIOQ); - - return EC_SUCCESS; } DECLARE_HOOK(HOOK_INIT, gpio_init, HOOK_PRIO_DEFAULT); - void gpio_set_alternate_function(int port, int mask, int func) { int port_index = find_gpio_port_index(port); |