summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
authorNicolas Boichat <drinkcat@chromium.org>2018-05-24 18:01:58 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-05-24 19:30:17 -0700
commitc7aaf471c975a3fd71423401696667a76ab4935a (patch)
treeed8654f109b5846fa2efcac00f83b31b372fe9b1 /driver
parent3db1b5ffb82d953886389acad765e08356a1678c (diff)
downloadchrome-ec-c7aaf471c975a3fd71423401696667a76ab4935a.tar.gz
touchpad_elan: Ensure we at least have 1k of shared memory
Debugging commands may request buffers up to that size. BRANCH=poppy BUG=b:63993891 TEST=make buildall -j Change-Id: I6dedfafc4e36d311026f9678e2cac99c85036ce0 Signed-off-by: Nicolas Boichat <drinkcat@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1071311 Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r--driver/touchpad_elan.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/driver/touchpad_elan.c b/driver/touchpad_elan.c
index d876c76fb9..e1f95f3949 100644
--- a/driver/touchpad_elan.c
+++ b/driver/touchpad_elan.c
@@ -574,6 +574,9 @@ allowed_command_hashes[TOUCHPAD_ELAN_DEBUG_NUM_CMD][SHA256_DIGEST_SIZE] = {
},
};
+/* Debugging commands need to allocate a <=1k buffer. */
+SHARED_MEM_CHECK_SIZE(1024);
+
int touchpad_debug(const uint8_t *param, unsigned int param_size,
uint8_t **data, unsigned int *data_size)
{