diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2015-02-10 11:39:40 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-03-02 06:37:00 +0300 |
commit | 8660172e1d6528be02eba78516ff8282e694bb26 (patch) | |
tree | ffdfd598e38919f6b71fa613887b31c6c978286d /drivers/misc/mei/client.c | |
parent | c54bf3ab7536e062b507b625bfd2befb9b2cb841 (diff) | |
download | linux-8660172e1d6528be02eba78516ff8282e694bb26.tar.xz |
mei: iamthif: use client write functions
Reduce code duplication in amthif code by reusing
regular client write functions.
Add completed flag to cb so amthif client can add
rx credits on write completion
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/client.c')
-rw-r--r-- | drivers/misc/mei/client.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 3e9cf0db5540..d9f4e28ac972 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -1106,6 +1106,7 @@ int mei_cl_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb, cl->status = 0; cl->writing_state = MEI_WRITING; cb->buf_idx += mei_hdr.length; + cb->completed = mei_hdr.msg_complete == 1; if (mei_hdr.msg_complete) { if (mei_cl_flow_ctrl_reduce(cl)) @@ -1194,6 +1195,7 @@ int mei_cl_write(struct mei_cl *cl, struct mei_cl_cb *cb, bool blocking) cl->writing_state = MEI_WRITING; cb->buf_idx = mei_hdr.length; + cb->completed = mei_hdr.msg_complete == 1; out: if (mei_hdr.msg_complete) { |