提交 e773efc4 编写于 作者: T Tomas Winkler 提交者: Greg Kroah-Hartman

mei: amthif: prefix cb list with amthif

amthif cb list were prefixed with amthi_ instead
if amthif.
Signed-off-by: NTomas Winkler <tomas.winkler@intel.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ab5c4a56
......@@ -124,7 +124,7 @@ struct mei_cl_cb *mei_amthif_find_read_list_entry(struct mei_device *dev,
struct mei_cl_cb *next = NULL;
list_for_each_entry_safe(pos, next,
&dev->amthi_read_complete_list.list, list) {
&dev->amthif_rd_complete_list.list, list) {
cl_temp = (struct mei_cl *)pos->file_private;
if (cl_temp && cl_temp == &dev->iamthif_cl &&
pos->file_object == file)
......@@ -351,12 +351,12 @@ int mei_amthif_write(struct mei_device *dev, struct mei_cl_cb *cb)
cb->major_file_operations = MEI_IOCTL;
if (!list_empty(&dev->amthi_cmd_list.list) ||
if (!list_empty(&dev->amthif_cmd_list.list) ||
dev->iamthif_state != MEI_IAMTHIF_IDLE) {
dev_dbg(&dev->pdev->dev,
"amthif state = %d\n", dev->iamthif_state);
dev_dbg(&dev->pdev->dev, "AMTHIF: add cb to the wait list\n");
list_add_tail(&cb->list, &dev->amthi_cmd_list.list);
list_add_tail(&cb->list, &dev->amthif_cmd_list.list);
return 0;
}
return mei_amthif_send_cmd(dev, cb);
......@@ -388,7 +388,7 @@ void mei_amthif_run_next_cmd(struct mei_device *dev)
dev_dbg(&dev->pdev->dev, "complete amthi cmd_list cb.\n");
list_for_each_entry_safe(pos, next, &dev->amthi_cmd_list.list, list) {
list_for_each_entry_safe(pos, next, &dev->amthif_cmd_list.list, list) {
list_del(&pos->list);
cl_tmp = (struct mei_cl *)pos->file_private;
......@@ -589,7 +589,7 @@ void mei_amthif_complete(struct mei_device *dev, struct mei_cl_cb *cb)
memcpy(cb->response_buffer.data,
dev->iamthif_msg_buf,
dev->iamthif_msg_buf_index);
list_add_tail(&cb->list, &dev->amthi_read_complete_list.list);
list_add_tail(&cb->list, &dev->amthif_rd_complete_list.list);
dev_dbg(&dev->pdev->dev, "amthi read completed\n");
dev->iamthif_timer = jiffies;
dev_dbg(&dev->pdev->dev, "dev->iamthif_timer = %ld\n",
......
......@@ -80,8 +80,8 @@ int mei_cl_flush_queues(struct mei_cl *cl)
mei_io_list_flush(&cl->dev->write_waiting_list, cl);
mei_io_list_flush(&cl->dev->ctrl_wr_list, cl);
mei_io_list_flush(&cl->dev->ctrl_rd_list, cl);
mei_io_list_flush(&cl->dev->amthi_cmd_list, cl);
mei_io_list_flush(&cl->dev->amthi_read_complete_list, cl);
mei_io_list_flush(&cl->dev->amthif_cmd_list, cl);
mei_io_list_flush(&cl->dev->amthif_rd_complete_list, cl);
return 0;
}
......@@ -117,8 +117,8 @@ struct mei_device *mei_device_init(struct pci_dev *pdev)
mei_io_list_init(&dev->write_waiting_list);
mei_io_list_init(&dev->ctrl_wr_list);
mei_io_list_init(&dev->ctrl_rd_list);
mei_io_list_init(&dev->amthi_cmd_list);
mei_io_list_init(&dev->amthi_read_complete_list);
mei_io_list_init(&dev->amthif_cmd_list);
mei_io_list_init(&dev->amthif_rd_complete_list);
dev->pdev = pdev;
return dev;
}
......
......@@ -1127,7 +1127,6 @@ void mei_timer(struct work_struct *work)
unsigned long timeout;
struct mei_cl *cl_pos = NULL;
struct mei_cl *cl_next = NULL;
struct list_head *amthi_complete_list = NULL;
struct mei_cl_cb *cb_pos = NULL;
struct mei_cl_cb *cb_next = NULL;
......@@ -1195,9 +1194,8 @@ void mei_timer(struct work_struct *work)
dev_dbg(&dev->pdev->dev, "freeing AMTHI for other requests\n");
amthi_complete_list = &dev->amthi_read_complete_list.list;
list_for_each_entry_safe(cb_pos, cb_next, amthi_complete_list, list) {
list_for_each_entry_safe(cb_pos, cb_next,
&dev->amthif_rd_complete_list.list, list) {
cl_pos = cb_pos->file_object->private_data;
......
......@@ -146,9 +146,8 @@ static bool mei_clear_lists(struct mei_device *dev, struct file *file)
bool removed = false;
/* remove callbacks associated with a file */
mei_clear_list(dev, file, &dev->amthi_cmd_list.list);
if (mei_clear_list(dev, file,
&dev->amthi_read_complete_list.list))
mei_clear_list(dev, file, &dev->amthif_cmd_list.list);
if (mei_clear_list(dev, file, &dev->amthif_rd_complete_list.list))
removed = true;
mei_clear_list(dev, file, &dev->ctrl_rd_list.list);
......
......@@ -184,16 +184,13 @@ struct mei_device {
/*
* lists of queues
*/
/* array of pointers to aio lists */
/* array of pointers to aio lists */
struct mei_cl_cb read_list; /* driver read queue */
struct mei_cl_cb write_list; /* driver write queue */
struct mei_cl_cb write_waiting_list; /* write waiting queue */
struct mei_cl_cb ctrl_wr_list; /* managed write IOCTL list */
struct mei_cl_cb ctrl_rd_list; /* managed read IOCTL list */
struct mei_cl_cb amthi_cmd_list; /* amthi list for cmd waiting */
/* driver managed amthi list for reading completed amthi cmd data */
struct mei_cl_cb amthi_read_complete_list;
/*
* list of files
*/
......@@ -254,6 +251,10 @@ struct mei_device {
unsigned char wd_data[MEI_WD_START_MSG_SIZE];
/* amthif list for cmd waiting */
struct mei_cl_cb amthif_cmd_list;
/* driver managed amthif list for reading completed amthif cmd data */
struct mei_cl_cb amthif_rd_complete_list;
struct file *iamthif_file_object;
struct mei_cl iamthif_cl;
struct mei_cl_cb *iamthif_current_cb;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册