diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2012-11-01 21:17:18 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-01 12:31:19 -0700 |
commit | ab5c4a56d46f6a41d238aa6546f900407c9be275 (patch) | |
tree | f4150a5cc01bc2af12c01d6043b43b0b89214105 /drivers/misc/mei/main.c | |
parent | c7d3df354dcb7477900b29a1200744a8c976c03a (diff) | |
download | blackbird-op-linux-ab5c4a56d46f6a41d238aa6546f900407c9be275.tar.gz blackbird-op-linux-ab5c4a56d46f6a41d238aa6546f900407c9be275.zip |
mei: move amthif specific code from mei_write to mei_amthif_write
For sake of amthif consolidation move amthif specific code from
mei_write to mei_amthif_write
The original mei_amthif_write to mei_amthif_send_cmd
as this function deals with sending single command
while mei_amthif_write is interface function called from
the main driver which in turns calls mei_amthif_send_cmd
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/main.c')
-rw-r--r-- | drivers/misc/mei/main.c | 25 |
1 files changed, 5 insertions, 20 deletions
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index d8221a5a7ee8..ff50cc14cc39 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c @@ -620,27 +620,12 @@ static ssize_t mei_write(struct file *file, const char __user *ubuf, cl->sm_state |= MEI_WD_STATE_INDEPENDENCE_MSG_SENT; if (cl == &dev->iamthif_cl) { - rets = mei_io_cb_alloc_resp_buf(write_cb, dev->iamthif_mtu); - if (rets) - goto err; + rets = mei_amthif_write(dev, write_cb); - write_cb->major_file_operations = MEI_IOCTL; - - if (!list_empty(&dev->amthi_cmd_list.list) || - dev->iamthif_state != MEI_IAMTHIF_IDLE) { - dev_dbg(&dev->pdev->dev, "amthi_state = %d\n", - (int) dev->iamthif_state); - dev_dbg(&dev->pdev->dev, "add amthi cb to amthi cmd waiting list\n"); - list_add_tail(&write_cb->list, &dev->amthi_cmd_list.list); - } else { - dev_dbg(&dev->pdev->dev, "call amthi write\n"); - rets = mei_amthif_write(dev, write_cb); - - if (rets) { - dev_err(&dev->pdev->dev, "amthi write failed with status = %d\n", - rets); - goto err; - } + if (rets) { + dev_err(&dev->pdev->dev, + "amthi write failed with status = %d\n", rets); + goto err; } mutex_unlock(&dev->device_lock); return length; |