summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chip/lm4/i2c.c2
-rw-r--r--chip/lm4/peci.c2
-rw-r--r--common/fan.c2
-rw-r--r--common/thermal.c2
-rw-r--r--test/hooks.c1
5 files changed, 5 insertions, 4 deletions
diff --git a/chip/lm4/i2c.c b/chip/lm4/i2c.c
index 44bec4e2f6..5f86f3045f 100644
--- a/chip/lm4/i2c.c
+++ b/chip/lm4/i2c.c
@@ -269,7 +269,7 @@ static void i2c_freq_changed(void)
LM4_I2C_MTPR(i2c_ports[i].port) = tpr;
}
}
-DECLARE_HOOK(HOOK_FREQ_CHANGE, i2c_freq_changed, HOOK_PRIO_DEFAULT + 1);
+DECLARE_HOOK(HOOK_FREQ_CHANGE, i2c_freq_changed, HOOK_PRIO_DEFAULT);
static void i2c_init(void)
{
diff --git a/chip/lm4/peci.c b/chip/lm4/peci.c
index 74f081d6c4..d3fbd30947 100644
--- a/chip/lm4/peci.c
+++ b/chip/lm4/peci.c
@@ -113,7 +113,7 @@ static void peci_freq_changed(void)
(PECI_RETRY_COUNT << 12) |
(PECI_ERROR_BYPASS << 11);
}
-DECLARE_HOOK(HOOK_FREQ_CHANGE, peci_freq_changed, HOOK_PRIO_DEFAULT - 1);
+DECLARE_HOOK(HOOK_FREQ_CHANGE, peci_freq_changed, HOOK_PRIO_DEFAULT);
static void peci_init(void)
{
diff --git a/common/fan.c b/common/fan.c
index 874b73537b..b080253944 100644
--- a/common/fan.c
+++ b/common/fan.c
@@ -373,7 +373,7 @@ static void pwm_fan_init(void)
for (i = 0; i < EC_FAN_SPEED_ENTRIES; i++)
mapped[i] = EC_FAN_SPEED_NOT_PRESENT;
}
-DECLARE_HOOK(HOOK_INIT, pwm_fan_init, HOOK_PRIO_DEFAULT + 1);
+DECLARE_HOOK(HOOK_INIT, pwm_fan_init, HOOK_PRIO_DEFAULT);
static void pwm_fan_second(void)
{
diff --git a/common/thermal.c b/common/thermal.c
index c7840065de..97c12412e0 100644
--- a/common/thermal.c
+++ b/common/thermal.c
@@ -166,7 +166,7 @@ static void thermal_control(void)
}
/* Wait until after the sensors have been read */
-DECLARE_HOOK(HOOK_SECOND, thermal_control, HOOK_PRIO_TEMP_SENSOR + 1);
+DECLARE_HOOK(HOOK_SECOND, thermal_control, HOOK_PRIO_TEMP_SENSOR_DONE);
/*****************************************************************************/
/* Console commands */
diff --git a/test/hooks.c b/test/hooks.c
index e688e610c2..0e3c4f0e0e 100644
--- a/test/hooks.c
+++ b/test/hooks.c
@@ -40,6 +40,7 @@ static void tick2_hook(void)
tick2_hook_count++;
tick_count_seen_by_tick2 = tick_hook_count;
}
+/* tick2_hook() prio means it should be called after tick_hook() */
DECLARE_HOOK(HOOK_TICK, tick2_hook, HOOK_PRIO_DEFAULT+1);
static void second_hook(void)