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>
This commit is contained in:
Tomas Winkler
2015-02-10 10:39:40 +02:00
committed by Greg Kroah-Hartman
parent c54bf3ab75
commit 8660172e1d
4 changed files with 52 additions and 140 deletions

View File

@@ -401,7 +401,7 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf,
}
if (cl == &dev->iamthif_cl) {
rets = mei_amthif_write(dev, write_cb);
rets = mei_amthif_write(cl, write_cb);
if (rets) {
dev_err(dev->dev,