diff options
author | Alexander Usyskin <alexander.usyskin@intel.com> | 2017-01-27 15:32:45 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-01-31 11:07:43 +0100 |
commit | 962ff7bcec243dc5ff6dd3cbad6ed585e3177556 (patch) | |
tree | 1517dcaa5e0cf57ee2a7b8c70be9874a0198243a /drivers/misc/mei/amthif.c | |
parent | mei: amthif: allow the read completion after close (diff) | |
download | linux-962ff7bcec243dc5ff6dd3cbad6ed585e3177556.tar.xz linux-962ff7bcec243dc5ff6dd3cbad6ed585e3177556.zip |
mei: replace callback structures used as list head by list_head
mei_dev structure used struct mei_cl_cb type variables as for holding
callbacks list heads. Replace them by the actual struct list_head
as there is no other info that is handled. This slims down
the mei_dev structure and mostly streamline the code.
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/amthif.c')
-rw-r--r-- | drivers/misc/mei/amthif.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index 2d553cd6d4d0..366ef1fe9b90 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c @@ -132,8 +132,7 @@ int mei_amthif_run_next_cmd(struct mei_device *dev) dev_dbg(dev->dev, "complete amthif cmd_list cb.\n"); - cb = list_first_entry_or_null(&dev->amthif_cmd_list.list, - typeof(*cb), list); + cb = list_first_entry_or_null(&dev->amthif_cmd_list, typeof(*cb), list); if (!cb) { dev->iamthif_state = MEI_IAMTHIF_IDLE; cl->fp = NULL; @@ -167,7 +166,7 @@ int mei_amthif_write(struct mei_cl *cl, struct mei_cl_cb *cb) struct mei_device *dev = cl->dev; - list_add_tail(&cb->list, &dev->amthif_cmd_list.list); + list_add_tail(&cb->list, &dev->amthif_cmd_list); /* * The previous request is still in processing, queue this one. @@ -211,7 +210,7 @@ unsigned int mei_amthif_poll(struct file *file, poll_table *wait) * Return: 0, OK; otherwise, error. */ int mei_amthif_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb, - struct mei_cl_cb *cmpl_list) + struct list_head *cmpl_list) { int ret; @@ -237,7 +236,7 @@ int mei_amthif_irq_write(struct mei_cl *cl, struct mei_cl_cb *cb, */ int mei_amthif_irq_read_msg(struct mei_cl *cl, struct mei_msg_hdr *mei_hdr, - struct mei_cl_cb *cmpl_list) + struct list_head *cmpl_list) { struct mei_device *dev; int ret; @@ -354,7 +353,7 @@ int mei_amthif_release(struct mei_device *dev, struct file *file) } /* Don't clean ctrl_rd_list here, the reads has to be completed */ - mei_clear_list(file, &dev->amthif_cmd_list.list); + mei_clear_list(file, &dev->amthif_cmd_list); mei_clear_list(file, &cl->rd_completed); return 0; |