summaryrefslogtreecommitdiff
path: root/board/oak
diff options
context:
space:
mode:
authorAnton Staaf <robotboy@chromium.org>2016-03-23 12:45:28 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-04-18 17:32:40 -0700
commit068cd0850684ee28a5a514e5a270edce2edb3979 (patch)
treee84f2316e37baa72f1c9611e665749d91a3ce8fd /board/oak
parent1e7c280491232110e1006d545f9a61ca05d469d5 (diff)
downloadchrome-ec-068cd0850684ee28a5a514e5a270edce2edb3979.tar.gz
Deferred: Use deferred_data instead of function pointer
Previously calls to hook_call_deferred were passed the function to call, which was then looked up in the .rodata.deferred section with a linear search. This linear search can be replaced with a subtract by passing the pointer to the deferred_data object created when DECLARE_DEFERRED was invoked. Signed-off-by: Anton Staaf <robotboy@chromium.org> BRANCH=None BUG=None CQ-DEPEND=CL:*255812 TEST=make buildall -j Change-Id: I951dd1541302875b102dd086154cf05591694440 Reviewed-on: https://chromium-review.googlesource.com/334315 Commit-Ready: Bill Richardson <wfrichar@chromium.org> Tested-by: Bill Richardson <wfrichar@chromium.org> Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Diffstat (limited to 'board/oak')
-rw-r--r--board/oak/board.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/board/oak/board.c b/board/oak/board.c
index 9f770d8865..f66c35acee 100644
--- a/board/oak/board.c
+++ b/board/oak/board.c
@@ -396,8 +396,8 @@ void board_typec_dp_on(int port)
board_typec_set_dp_hpd(port, 1);
} else {
board_typec_set_dp_hpd(port, 0);
- hook_call_deferred(hpd_irq_deferred,
- HPD_DSTREAM_DEBOUNCE_IRQ);
+ hook_call_deferred(&hpd_irq_deferred_data,
+ HPD_DSTREAM_DEBOUNCE_IRQ);
}
}
@@ -589,7 +589,7 @@ static void board_extpower(void)
{
board_extpower_buffer_to_soc();
#ifdef CONFIG_TEMP_SENSOR_TMP432
- hook_call_deferred(tmp432_set_power_deferred, 0);
+ hook_call_deferred(&tmp432_set_power_deferred_data, 0);
#endif
}
DECLARE_HOOK(HOOK_AC_CHANGE, board_extpower, HOOK_PRIO_DEFAULT);
@@ -625,7 +625,7 @@ DECLARE_HOOK(HOOK_CHIPSET_SHUTDOWN, board_chipset_shutdown, HOOK_PRIO_DEFAULT);
static void board_chipset_resume(void)
{
#ifdef CONFIG_TEMP_SENSOR_TMP432
- hook_call_deferred(tmp432_set_power_deferred, 0);
+ hook_call_deferred(&tmp432_set_power_deferred_data, 0);
#endif
}
DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
@@ -634,7 +634,7 @@ DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT);
static void board_chipset_suspend(void)
{
#ifdef CONFIG_TEMP_SENSOR_TMP432
- hook_call_deferred(tmp432_set_power_deferred, 0);
+ hook_call_deferred(&tmp432_set_power_deferred_data, 0);
#endif
}
DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT);