summaryrefslogtreecommitdiff
path: root/board/lucid
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/lucid
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/lucid')
-rw-r--r--board/lucid/board.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/board/lucid/board.c b/board/lucid/board.c
index a396f0b547..f5f03e2895 100644
--- a/board/lucid/board.c
+++ b/board/lucid/board.c
@@ -105,7 +105,8 @@ void vbus_evt(enum gpio_signal signal)
* lucid only has one port and charging is always enabled.
*/
- hook_call_deferred(usb_charger_bc12_detect, USB_CHG_DETECT_DELAY_US);
+ hook_call_deferred(&usb_charger_bc12_detect_data,
+ USB_CHG_DETECT_DELAY_US);
update_vbus_supplier(gpio_get_level(signal));
task_wake(TASK_ID_PD_C0);