summaryrefslogtreecommitdiff
path: root/lib/win_minmax.c
diff options
context:
space:
mode:
authorNick Crews <ncrews@chromium.org>2019-06-24 13:00:42 -0600
committerEnric Balletbo i Serra <enric.balletbo@collabora.com>2019-06-25 12:33:05 +0200
commit1d333ef3d599026897fb11b4f89f9f8f30838139 (patch)
tree40e433dd2ed786ef9e5919c733ede0e625c9ed2c /lib/win_minmax.c
parent9eecd07b34507de9d6a9c264d13d30e1ee5fabe8 (diff)
platform/chrome: wilco_ec: Add circular buffer as event queue
The current implementation of the event queue both wastes space using a doubly linked list and isn't super obvious in how it behaves. This converts the queue to an actual circular buffer. The size of the queue is a tunable module parameter. This also fixes a few other things: - A memory leak that occurred when the ACPI device was removed, but the events were not freed from the queue. - Now kfree() the oldest event from outside all locks. - Add newline to logging messages. - Add helper macros to calculate size of events. - Remove unneeded lock around a check for dev_data->exist in hangup_device(). - Remove an unneeded null event pointer check in enqueue_events(). - Correct some comments. Signed-off-by: Nick Crews <ncrews@chromium.org> Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Diffstat (limited to 'lib/win_minmax.c')
0 files changed, 0 insertions, 0 deletions