From f4e772708bde3e4e1d184190a7f0be2417d2029a Mon Sep 17 00:00:00 2001 From: Randall Spangler Date: Thu, 19 Apr 2012 12:42:35 -0700 Subject: Added HOOK_INIT for driver module inits This covers modules which need to initialize before task_start(), but don't particularly care in what order they're initialized. Signed-off-by: Randall Spangler BUG=none TEST=if it boots, it works Change-Id: I69829aac8d1c3c14ee04916a794b84bbf03a09eb --- chip/lm4/pwm.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'chip/lm4/pwm.c') diff --git a/chip/lm4/pwm.c b/chip/lm4/pwm.c index 7fc95f0124..0a37ffc5b8 100644 --- a/chip/lm4/pwm.c +++ b/chip/lm4/pwm.c @@ -8,6 +8,7 @@ #include "board.h" #include "console.h" #include "gpio.h" +#include "hooks.h" #include "pwm.h" #include "registers.h" #include "uart.h" @@ -272,7 +273,7 @@ DECLARE_CONSOLE_COMMAND(kblight, command_kblight); /*****************************************************************************/ /* Initialization */ -int pwm_init(void) +static int pwm_init(void) { volatile uint32_t scratch __attribute__((unused)); @@ -324,3 +325,4 @@ int pwm_init(void) return EC_SUCCESS; } +DECLARE_HOOK(HOOK_INIT, pwm_init, HOOK_PRIO_DEFAULT); -- cgit v1.2.1