summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/amthif.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2016-07-26 01:06:05 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-30 14:39:42 +0200
commit3030dc056459439d756d81a920e135893076a348 (patch)
treefde7911d5d9b3893c17e9f71227e2ec57ba7fc86 /drivers/misc/mei/amthif.c
parent4034b81ba38967ad0056781572a9d9a95d39f02e (diff)
downloadlinux-3030dc056459439d756d81a920e135893076a348.tar.gz
linux-3030dc056459439d756d81a920e135893076a348.tar.bz2
linux-3030dc056459439d756d81a920e135893076a348.zip
mei: add wrapper for queuing control commands.
Enclose the boiler plate code of allocating a control/hbm command cb and enqueueing it onto ctrl_wr.list in a convenient wrapper mei_cl_enqueue_ctrl_wr_cb(). This is a preparatory patch for enabling consecutive reads. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/amthif.c')
-rw-r--r--drivers/misc/mei/amthif.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c
index 227fd5a816a6..e8029235504d 100644
--- a/drivers/misc/mei/amthif.c
+++ b/drivers/misc/mei/amthif.c
@@ -188,20 +188,19 @@ out:
* mei_amthif_read_start - queue message for sending read credential
*
* @cl: host client
- * @file: file pointer of message recipient
+ * @fp: file pointer of message recipient
*
* Return: 0 on success, <0 on failure.
*/
-static int mei_amthif_read_start(struct mei_cl *cl, const struct file *file)
+static int mei_amthif_read_start(struct mei_cl *cl, const struct file *fp)
{
struct mei_device *dev = cl->dev;
struct mei_cl_cb *cb;
- cb = mei_cl_alloc_cb(cl, mei_cl_mtu(cl), MEI_FOP_READ, file);
+ cb = mei_cl_enqueue_ctrl_wr_cb(cl, mei_cl_mtu(cl), MEI_FOP_READ, fp);
if (!cb)
return -ENOMEM;
- list_add_tail(&cb->list, &dev->ctrl_wr_list.list);
cl->rx_flow_ctrl_creds++;
dev->iamthif_state = MEI_IAMTHIF_READING;