diff options
author | Alexander Usyskin <alexander.usyskin@intel.com> | 2014-08-14 16:22:20 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-24 07:56:16 +0200 |
commit | 5456796b1a2aedd2d6345944b73ac41aeb8cb589 (patch) | |
tree | 958f8335ef341fa67b416f0bcc96a3e19f2c2f44 /drivers/misc/mei/interrupt.c | |
parent | mei: me: wait for hw ready non-interruptible (diff) | |
download | linux-5456796b1a2aedd2d6345944b73ac41aeb8cb589.tar.xz linux-5456796b1a2aedd2d6345944b73ac41aeb8cb589.zip |
mei: amthif: use service function to flush amthif queue
Replace open coded loop with an existing service function:
mei_io_list_flush
Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/interrupt.c')
-rw-r--r-- | drivers/misc/mei/interrupt.c | 13 |
1 files changed, 2 insertions, 11 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index 4e3cba6da3f5..19709b70874e 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c @@ -556,8 +556,6 @@ void mei_timer(struct work_struct *work) { unsigned long timeout; struct mei_cl *cl; - struct mei_cl_cb *cb_pos = NULL; - struct mei_cl_cb *cb_next = NULL; struct mei_device *dev = container_of(work, struct mei_device, timer_work.work); @@ -632,15 +630,8 @@ void mei_timer(struct work_struct *work) dev_dbg(&dev->pdev->dev, "freeing AMTHI for other requests\n"); - list_for_each_entry_safe(cb_pos, cb_next, - &dev->amthif_rd_complete_list.list, list) { - - cl = cb_pos->file_object->private_data; - - /* Finding the AMTHI entry. */ - if (cl == &dev->iamthif_cl) - list_del(&cb_pos->list); - } + mei_io_list_flush(&dev->amthif_rd_complete_list, + &dev->iamthif_cl); mei_io_cb_free(dev->iamthif_current_cb); dev->iamthif_current_cb = NULL; |