summaryrefslogtreecommitdiff
path: root/common/acpi.c
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 /common/acpi.c
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 'common/acpi.c')
-rw-r--r--common/acpi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common/acpi.c b/common/acpi.c
index 904c6fe055..58bb658a84 100644
--- a/common/acpi.c
+++ b/common/acpi.c
@@ -254,7 +254,7 @@ int acpi_ap_to_ec(int is_cmd, uint8_t value, uint8_t *resultptr)
* Disable from deferred function in case burst mode is enabled
* for an extremely long time (ex. kernel bug / crash).
*/
- hook_call_deferred(acpi_disable_burst_deferred, 1*SECOND);
+ hook_call_deferred(&acpi_disable_burst_deferred_data, 1*SECOND);
/* ACPI 5.0-12.3.3: Burst ACK */
*resultptr = 0x90;
@@ -263,7 +263,7 @@ int acpi_ap_to_ec(int is_cmd, uint8_t value, uint8_t *resultptr)
acpi_read_cache.enabled = 0;
/* Leave burst mode */
- hook_call_deferred(acpi_disable_burst_deferred, -1);
+ hook_call_deferred(&acpi_disable_burst_deferred_data, -1);
lpc_clear_acpi_status_mask(EC_LPC_STATUS_BURST_MODE);
}