diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2012-11-11 10:37:58 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-11-15 18:34:18 -0500 |
commit | e773efc405026bb8540c84bf45420bd66d5b34a7 (patch) | |
tree | 97d02615bbcd3622bcc80f26bfb05bef4a474615 /drivers | |
parent | ab5c4a56d46f6a41d238aa6546f900407c9be275 (diff) |
mei: amthif: prefix cb list with amthif
amthif cb list were prefixed with amthi_ instead
if amthif.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/misc/mei/amthif.c | 10 | ||||
-rw-r--r-- | drivers/misc/mei/init.c | 8 | ||||
-rw-r--r-- | drivers/misc/mei/interrupt.c | 6 | ||||
-rw-r--r-- | drivers/misc/mei/main.c | 5 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 9 |
5 files changed, 18 insertions, 20 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index 96db3ad21259..1de28df94da4 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c | |||
@@ -124,7 +124,7 @@ struct mei_cl_cb *mei_amthif_find_read_list_entry(struct mei_device *dev, | |||
124 | struct mei_cl_cb *next = NULL; | 124 | struct mei_cl_cb *next = NULL; |
125 | 125 | ||
126 | list_for_each_entry_safe(pos, next, | 126 | list_for_each_entry_safe(pos, next, |
127 | &dev->amthi_read_complete_list.list, list) { | 127 | &dev->amthif_rd_complete_list.list, list) { |
128 | cl_temp = (struct mei_cl *)pos->file_private; | 128 | cl_temp = (struct mei_cl *)pos->file_private; |
129 | if (cl_temp && cl_temp == &dev->iamthif_cl && | 129 | if (cl_temp && cl_temp == &dev->iamthif_cl && |
130 | pos->file_object == file) | 130 | pos->file_object == file) |
@@ -351,12 +351,12 @@ int mei_amthif_write(struct mei_device *dev, struct mei_cl_cb *cb) | |||
351 | 351 | ||
352 | cb->major_file_operations = MEI_IOCTL; | 352 | cb->major_file_operations = MEI_IOCTL; |
353 | 353 | ||
354 | if (!list_empty(&dev->amthi_cmd_list.list) || | 354 | if (!list_empty(&dev->amthif_cmd_list.list) || |
355 | dev->iamthif_state != MEI_IAMTHIF_IDLE) { | 355 | dev->iamthif_state != MEI_IAMTHIF_IDLE) { |
356 | dev_dbg(&dev->pdev->dev, | 356 | dev_dbg(&dev->pdev->dev, |
357 | "amthif state = %d\n", dev->iamthif_state); | 357 | "amthif state = %d\n", dev->iamthif_state); |
358 | dev_dbg(&dev->pdev->dev, "AMTHIF: add cb to the wait list\n"); | 358 | dev_dbg(&dev->pdev->dev, "AMTHIF: add cb to the wait list\n"); |
359 | list_add_tail(&cb->list, &dev->amthi_cmd_list.list); | 359 | list_add_tail(&cb->list, &dev->amthif_cmd_list.list); |
360 | return 0; | 360 | return 0; |
361 | } | 361 | } |
362 | return mei_amthif_send_cmd(dev, cb); | 362 | return mei_amthif_send_cmd(dev, cb); |
@@ -388,7 +388,7 @@ void mei_amthif_run_next_cmd(struct mei_device *dev) | |||
388 | 388 | ||
389 | dev_dbg(&dev->pdev->dev, "complete amthi cmd_list cb.\n"); | 389 | dev_dbg(&dev->pdev->dev, "complete amthi cmd_list cb.\n"); |
390 | 390 | ||
391 | list_for_each_entry_safe(pos, next, &dev->amthi_cmd_list.list, list) { | 391 | list_for_each_entry_safe(pos, next, &dev->amthif_cmd_list.list, list) { |
392 | list_del(&pos->list); | 392 | list_del(&pos->list); |
393 | cl_tmp = (struct mei_cl *)pos->file_private; | 393 | cl_tmp = (struct mei_cl *)pos->file_private; |
394 | 394 | ||
@@ -589,7 +589,7 @@ void mei_amthif_complete(struct mei_device *dev, struct mei_cl_cb *cb) | |||
589 | memcpy(cb->response_buffer.data, | 589 | memcpy(cb->response_buffer.data, |
590 | dev->iamthif_msg_buf, | 590 | dev->iamthif_msg_buf, |
591 | dev->iamthif_msg_buf_index); | 591 | dev->iamthif_msg_buf_index); |
592 | list_add_tail(&cb->list, &dev->amthi_read_complete_list.list); | 592 | list_add_tail(&cb->list, &dev->amthif_rd_complete_list.list); |
593 | dev_dbg(&dev->pdev->dev, "amthi read completed\n"); | 593 | dev_dbg(&dev->pdev->dev, "amthi read completed\n"); |
594 | dev->iamthif_timer = jiffies; | 594 | dev->iamthif_timer = jiffies; |
595 | dev_dbg(&dev->pdev->dev, "dev->iamthif_timer = %ld\n", | 595 | dev_dbg(&dev->pdev->dev, "dev->iamthif_timer = %ld\n", |
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index 8c3c2689f70c..7e6d591fef49 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c | |||
@@ -80,8 +80,8 @@ int mei_cl_flush_queues(struct mei_cl *cl) | |||
80 | mei_io_list_flush(&cl->dev->write_waiting_list, cl); | 80 | mei_io_list_flush(&cl->dev->write_waiting_list, cl); |
81 | mei_io_list_flush(&cl->dev->ctrl_wr_list, cl); | 81 | mei_io_list_flush(&cl->dev->ctrl_wr_list, cl); |
82 | mei_io_list_flush(&cl->dev->ctrl_rd_list, cl); | 82 | mei_io_list_flush(&cl->dev->ctrl_rd_list, cl); |
83 | mei_io_list_flush(&cl->dev->amthi_cmd_list, cl); | 83 | mei_io_list_flush(&cl->dev->amthif_cmd_list, cl); |
84 | mei_io_list_flush(&cl->dev->amthi_read_complete_list, cl); | 84 | mei_io_list_flush(&cl->dev->amthif_rd_complete_list, cl); |
85 | return 0; | 85 | return 0; |
86 | } | 86 | } |
87 | 87 | ||
@@ -117,8 +117,8 @@ struct mei_device *mei_device_init(struct pci_dev *pdev) | |||
117 | mei_io_list_init(&dev->write_waiting_list); | 117 | mei_io_list_init(&dev->write_waiting_list); |
118 | mei_io_list_init(&dev->ctrl_wr_list); | 118 | mei_io_list_init(&dev->ctrl_wr_list); |
119 | mei_io_list_init(&dev->ctrl_rd_list); | 119 | mei_io_list_init(&dev->ctrl_rd_list); |
120 | mei_io_list_init(&dev->amthi_cmd_list); | 120 | mei_io_list_init(&dev->amthif_cmd_list); |
121 | mei_io_list_init(&dev->amthi_read_complete_list); | 121 | mei_io_list_init(&dev->amthif_rd_complete_list); |
122 | dev->pdev = pdev; | 122 | dev->pdev = pdev; |
123 | return dev; | 123 | return dev; |
124 | } | 124 | } |
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index 62f8b65fd11a..7193149678ec 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c | |||
@@ -1127,7 +1127,6 @@ void mei_timer(struct work_struct *work) | |||
1127 | unsigned long timeout; | 1127 | unsigned long timeout; |
1128 | struct mei_cl *cl_pos = NULL; | 1128 | struct mei_cl *cl_pos = NULL; |
1129 | struct mei_cl *cl_next = NULL; | 1129 | struct mei_cl *cl_next = NULL; |
1130 | struct list_head *amthi_complete_list = NULL; | ||
1131 | struct mei_cl_cb *cb_pos = NULL; | 1130 | struct mei_cl_cb *cb_pos = NULL; |
1132 | struct mei_cl_cb *cb_next = NULL; | 1131 | struct mei_cl_cb *cb_next = NULL; |
1133 | 1132 | ||
@@ -1195,9 +1194,8 @@ void mei_timer(struct work_struct *work) | |||
1195 | 1194 | ||
1196 | dev_dbg(&dev->pdev->dev, "freeing AMTHI for other requests\n"); | 1195 | dev_dbg(&dev->pdev->dev, "freeing AMTHI for other requests\n"); |
1197 | 1196 | ||
1198 | amthi_complete_list = &dev->amthi_read_complete_list.list; | 1197 | list_for_each_entry_safe(cb_pos, cb_next, |
1199 | 1198 | &dev->amthif_rd_complete_list.list, list) { | |
1200 | list_for_each_entry_safe(cb_pos, cb_next, amthi_complete_list, list) { | ||
1201 | 1199 | ||
1202 | cl_pos = cb_pos->file_object->private_data; | 1200 | cl_pos = cb_pos->file_object->private_data; |
1203 | 1201 | ||
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c index ff50cc14cc39..bea545a5ae2b 100644 --- a/drivers/misc/mei/main.c +++ b/drivers/misc/mei/main.c | |||
@@ -146,9 +146,8 @@ static bool mei_clear_lists(struct mei_device *dev, struct file *file) | |||
146 | bool removed = false; | 146 | bool removed = false; |
147 | 147 | ||
148 | /* remove callbacks associated with a file */ | 148 | /* remove callbacks associated with a file */ |
149 | mei_clear_list(dev, file, &dev->amthi_cmd_list.list); | 149 | mei_clear_list(dev, file, &dev->amthif_cmd_list.list); |
150 | if (mei_clear_list(dev, file, | 150 | if (mei_clear_list(dev, file, &dev->amthif_rd_complete_list.list)) |
151 | &dev->amthi_read_complete_list.list)) | ||
152 | removed = true; | 151 | removed = true; |
153 | 152 | ||
154 | mei_clear_list(dev, file, &dev->ctrl_rd_list.list); | 153 | mei_clear_list(dev, file, &dev->ctrl_rd_list.list); |
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index 8b96d99b8577..ce246b0fb2d6 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -184,16 +184,13 @@ struct mei_device { | |||
184 | /* | 184 | /* |
185 | * lists of queues | 185 | * lists of queues |
186 | */ | 186 | */ |
187 | /* array of pointers to aio lists */ | 187 | /* array of pointers to aio lists */ |
188 | struct mei_cl_cb read_list; /* driver read queue */ | 188 | struct mei_cl_cb read_list; /* driver read queue */ |
189 | struct mei_cl_cb write_list; /* driver write queue */ | 189 | struct mei_cl_cb write_list; /* driver write queue */ |
190 | struct mei_cl_cb write_waiting_list; /* write waiting queue */ | 190 | struct mei_cl_cb write_waiting_list; /* write waiting queue */ |
191 | struct mei_cl_cb ctrl_wr_list; /* managed write IOCTL list */ | 191 | struct mei_cl_cb ctrl_wr_list; /* managed write IOCTL list */ |
192 | struct mei_cl_cb ctrl_rd_list; /* managed read IOCTL list */ | 192 | struct mei_cl_cb ctrl_rd_list; /* managed read IOCTL list */ |
193 | struct mei_cl_cb amthi_cmd_list; /* amthi list for cmd waiting */ | ||
194 | 193 | ||
195 | /* driver managed amthi list for reading completed amthi cmd data */ | ||
196 | struct mei_cl_cb amthi_read_complete_list; | ||
197 | /* | 194 | /* |
198 | * list of files | 195 | * list of files |
199 | */ | 196 | */ |
@@ -254,6 +251,10 @@ struct mei_device { | |||
254 | unsigned char wd_data[MEI_WD_START_MSG_SIZE]; | 251 | unsigned char wd_data[MEI_WD_START_MSG_SIZE]; |
255 | 252 | ||
256 | 253 | ||
254 | /* amthif list for cmd waiting */ | ||
255 | struct mei_cl_cb amthif_cmd_list; | ||
256 | /* driver managed amthif list for reading completed amthif cmd data */ | ||
257 | struct mei_cl_cb amthif_rd_complete_list; | ||
257 | struct file *iamthif_file_object; | 258 | struct file *iamthif_file_object; |
258 | struct mei_cl iamthif_cl; | 259 | struct mei_cl iamthif_cl; |
259 | struct mei_cl_cb *iamthif_current_cb; | 260 | struct mei_cl_cb *iamthif_current_cb; |