diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2012-10-15 06:06:48 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2012-10-24 18:36:39 -0400 |
commit | fb601adb350f82738210c0a1dc6af928a15391db (patch) | |
tree | bc230173aa912c64ca8aed863b5213a196e82ad3 /drivers/misc/mei/init.c | |
parent | 75f0ee1559c5d51948e029041a9b722b3e3f0b83 (diff) |
mei: kill usless struct mei_io_list
kill useless mei_io_list list wrapper and use directly
struct mei_cl_cb mei_cb which was its only member for managing io queues
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/init.c')
-rw-r--r-- | drivers/misc/mei/init.c | 31 |
1 files changed, 9 insertions, 22 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index 98f1430e3e14..2275cf03badd 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c | |||
@@ -48,34 +48,22 @@ const uuid_le mei_amthi_guid = UUID_LE(0x12f80028, 0xb4b7, 0x4b2d, 0xac, | |||
48 | 0x81, 0x4c); | 48 | 0x81, 0x4c); |
49 | 49 | ||
50 | /** | 50 | /** |
51 | * mei_io_list_init - Sets up a queue list. | ||
52 | * | ||
53 | * @list: An instance io list structure | ||
54 | * @dev: the device structure | ||
55 | */ | ||
56 | void mei_io_list_init(struct mei_io_list *list) | ||
57 | { | ||
58 | /* initialize our queue list */ | ||
59 | INIT_LIST_HEAD(&list->mei_cb.cb_list); | ||
60 | } | ||
61 | |||
62 | /** | ||
63 | * mei_io_list_flush - removes list entry belonging to cl. | 51 | * mei_io_list_flush - removes list entry belonging to cl. |
64 | * | 52 | * |
65 | * @list: An instance of our list structure | 53 | * @list: An instance of our list structure |
66 | * @cl: private data of the file object | 54 | * @cl: private data of the file object |
67 | */ | 55 | */ |
68 | void mei_io_list_flush(struct mei_io_list *list, struct mei_cl *cl) | 56 | void mei_io_list_flush(struct mei_cl_cb *list, struct mei_cl *cl) |
69 | { | 57 | { |
70 | struct mei_cl_cb *pos; | 58 | struct mei_cl_cb *pos; |
71 | struct mei_cl_cb *next; | 59 | struct mei_cl_cb *next; |
72 | 60 | ||
73 | list_for_each_entry_safe(pos, next, &list->mei_cb.cb_list, cb_list) { | 61 | list_for_each_entry_safe(pos, next, &list->list, list) { |
74 | if (pos->file_private) { | 62 | if (pos->file_private) { |
75 | struct mei_cl *cl_tmp; | 63 | struct mei_cl *cl_tmp; |
76 | cl_tmp = (struct mei_cl *)pos->file_private; | 64 | cl_tmp = (struct mei_cl *)pos->file_private; |
77 | if (mei_cl_cmp_id(cl, cl_tmp)) | 65 | if (mei_cl_cmp_id(cl, cl_tmp)) |
78 | list_del(&pos->cb_list); | 66 | list_del(&pos->list); |
79 | } | 67 | } |
80 | } | 68 | } |
81 | } | 69 | } |
@@ -351,9 +339,8 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) | |||
351 | } | 339 | } |
352 | } | 340 | } |
353 | /* remove all waiting requests */ | 341 | /* remove all waiting requests */ |
354 | list_for_each_entry_safe(cb_pos, cb_next, | 342 | list_for_each_entry_safe(cb_pos, cb_next, &dev->write_list.list, list) { |
355 | &dev->write_list.mei_cb.cb_list, cb_list) { | 343 | list_del(&cb_pos->list); |
356 | list_del(&cb_pos->cb_list); | ||
357 | mei_free_cb_private(cb_pos); | 344 | mei_free_cb_private(cb_pos); |
358 | } | 345 | } |
359 | } | 346 | } |
@@ -685,7 +672,7 @@ int mei_disconnect_host_client(struct mei_device *dev, struct mei_cl *cl) | |||
685 | if (!cb) | 672 | if (!cb) |
686 | return -ENOMEM; | 673 | return -ENOMEM; |
687 | 674 | ||
688 | INIT_LIST_HEAD(&cb->cb_list); | 675 | mei_io_list_init(cb); |
689 | cb->file_private = cl; | 676 | cb->file_private = cl; |
690 | cb->major_file_operations = MEI_CLOSE; | 677 | cb->major_file_operations = MEI_CLOSE; |
691 | if (dev->mei_host_buffer_is_empty) { | 678 | if (dev->mei_host_buffer_is_empty) { |
@@ -696,11 +683,11 @@ int mei_disconnect_host_client(struct mei_device *dev, struct mei_cl *cl) | |||
696 | goto free; | 683 | goto free; |
697 | } | 684 | } |
698 | mdelay(10); /* Wait for hardware disconnection ready */ | 685 | mdelay(10); /* Wait for hardware disconnection ready */ |
699 | list_add_tail(&cb->cb_list, &dev->ctrl_rd_list.mei_cb.cb_list); | 686 | list_add_tail(&cb->list, &dev->ctrl_rd_list.list); |
700 | } else { | 687 | } else { |
701 | dev_dbg(&dev->pdev->dev, "add disconnect cb to control write list\n"); | 688 | dev_dbg(&dev->pdev->dev, "add disconnect cb to control write list\n"); |
702 | list_add_tail(&cb->cb_list, | 689 | list_add_tail(&cb->list, &dev->ctrl_wr_list.list); |
703 | &dev->ctrl_wr_list.mei_cb.cb_list); | 690 | |
704 | } | 691 | } |
705 | mutex_unlock(&dev->device_lock); | 692 | mutex_unlock(&dev->device_lock); |
706 | 693 | ||