From bbb40ce21d7a972c812621091390a994c6fce4b6 Mon Sep 17 00:00:00 2001 From: Nicolas Boichat Date: Thu, 14 Dec 2017 13:32:43 +0800 Subject: consumer: Remove flush operation Nobody is calling the flush function for consumer_ops structure, so let's remove it to save flash space, until we find a use for it. CQ-DEPEND=CL:*529221 BRANCH=none BUG=chromium:795624 TEST=make buildall -j, saves from 40 to 128 bytes on some boards. Change-Id: Iad18b30f419ccebc54a90914ec46da84b8d19601 Signed-off-by: Nicolas Boichat Reviewed-on: https://chromium-review.googlesource.com/826905 Reviewed-by: Randall Spangler Reviewed-by: Vincent Palatin --- common/queue_policies.c | 1 - common/usb_i2c.c | 5 ----- common/usb_update.c | 5 ----- 3 files changed, 11 deletions(-) (limited to 'common') diff --git a/common/queue_policies.c b/common/queue_policies.c index 85395fec15..090c837fae 100644 --- a/common/queue_policies.c +++ b/common/queue_policies.c @@ -38,6 +38,5 @@ struct consumer const null_consumer = { .queue = NULL, .ops = &((struct consumer_ops const) { .written = NULL, - .flush = NULL, }), }; diff --git a/common/usb_i2c.c b/common/usb_i2c.c index 5fa04e0ba1..cd67f68a7a 100644 --- a/common/usb_i2c.c +++ b/common/usb_i2c.c @@ -141,11 +141,6 @@ static void usb_i2c_written(struct consumer const *consumer, size_t count) hook_call_deferred(config->deferred, 0); } -static void usb_i2c_flush(struct consumer const *consumer) -{ -} - struct consumer_ops const usb_i2c_consumer_ops = { .written = usb_i2c_written, - .flush = usb_i2c_flush, }; diff --git a/common/usb_update.c b/common/usb_update.c index a97541dd9c..0ab7a3e2c6 100644 --- a/common/usb_update.c +++ b/common/usb_update.c @@ -552,14 +552,9 @@ static void update_out_handler(struct consumer const *consumer, size_t count) rx_state_ = rx_outside_block; } -static void update_flush(struct consumer const *consumer) -{ -} - struct consumer const update_consumer = { .queue = &usb_to_update, .ops = &((struct consumer_ops const) { .written = update_out_handler, - .flush = update_flush, }), }; -- cgit v1.2.1