aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/interrupt.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2012-11-11 10:37:59 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-15 18:34:18 -0500
commitdb3ed43185c6f5d4fd6c5ac963347b849540996e (patch)
tree46690fbfd58c7d2da479865c7061f6c50b8d6d64 /drivers/misc/mei/interrupt.c
parente773efc405026bb8540c84bf45420bd66d5b34a7 (diff)
mei: use type struct mei_cl *cl instead of void in struct mei_cb
We can use correct type 'struct mei_cl' instead of 'void *' for file_private in the struct mei_cb as there is no other type assigned to this member of the structure We rename the member from file_private to cl Remove about 10 lines of declarations of temporary variables used for type casting Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/interrupt.c')
-rw-r--r--drivers/misc/mei/interrupt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c
index 7193149678ec..acc994e3f20b 100644
--- a/drivers/misc/mei/interrupt.c
+++ b/drivers/misc/mei/interrupt.c
@@ -113,7 +113,7 @@ static int mei_irq_thread_read_client_message(struct mei_cl_cb *complete_list,
113 goto quit; 113 goto quit;
114 114
115 list_for_each_entry_safe(cb_pos, cb_next, &dev->read_list.list, list) { 115 list_for_each_entry_safe(cb_pos, cb_next, &dev->read_list.list, list) {
116 cl = (struct mei_cl *)cb_pos->file_private; 116 cl = cb_pos->cl;
117 if (cl && _mei_irq_thread_state_ok(cl, mei_hdr)) { 117 if (cl && _mei_irq_thread_state_ok(cl, mei_hdr)) {
118 cl->reading_state = MEI_READING; 118 cl->reading_state = MEI_READING;
119 buffer = cb_pos->response_buffer.data + cb_pos->buf_idx; 119 buffer = cb_pos->response_buffer.data + cb_pos->buf_idx;
@@ -263,7 +263,7 @@ static void mei_client_connect_response(struct mei_device *dev,
263 } 263 }
264 list_for_each_entry_safe(pos, next, &dev->ctrl_rd_list.list, list) { 264 list_for_each_entry_safe(pos, next, &dev->ctrl_rd_list.list, list) {
265 265
266 cl = (struct mei_cl *)pos->file_private; 266 cl = pos->cl;
267 if (!cl) { 267 if (!cl) {
268 list_del(&pos->list); 268 list_del(&pos->list);
269 return; 269 return;
@@ -301,7 +301,7 @@ static void mei_client_disconnect_response(struct mei_device *dev,
301 rs->status); 301 rs->status);
302 302
303 list_for_each_entry_safe(pos, next, &dev->ctrl_rd_list.list, list) { 303 list_for_each_entry_safe(pos, next, &dev->ctrl_rd_list.list, list) {
304 cl = (struct mei_cl *)pos->file_private; 304 cl = pos->cl;
305 305
306 if (!cl) { 306 if (!cl) {
307 list_del(&pos->list); 307 list_del(&pos->list);
@@ -981,7 +981,7 @@ static int mei_irq_thread_write_handler(struct mei_cl_cb *cmpl_list,
981 981
982 list = &dev->write_waiting_list; 982 list = &dev->write_waiting_list;
983 list_for_each_entry_safe(pos, next, &list->list, list) { 983 list_for_each_entry_safe(pos, next, &list->list, list) {
984 cl = (struct mei_cl *)pos->file_private; 984 cl = pos->cl;
985 if (cl == NULL) 985 if (cl == NULL)
986 continue; 986 continue;
987 987
@@ -1039,7 +1039,7 @@ static int mei_irq_thread_write_handler(struct mei_cl_cb *cmpl_list,
1039 /* complete control write list CB */ 1039 /* complete control write list CB */
1040 dev_dbg(&dev->pdev->dev, "complete control write list cb.\n"); 1040 dev_dbg(&dev->pdev->dev, "complete control write list cb.\n");
1041 list_for_each_entry_safe(pos, next, &dev->ctrl_wr_list.list, list) { 1041 list_for_each_entry_safe(pos, next, &dev->ctrl_wr_list.list, list) {
1042 cl = (struct mei_cl *) pos->file_private; 1042 cl = pos->cl;
1043 if (!cl) { 1043 if (!cl) {
1044 list_del(&pos->list); 1044 list_del(&pos->list);
1045 return -ENODEV; 1045 return -ENODEV;
@@ -1077,7 +1077,7 @@ static int mei_irq_thread_write_handler(struct mei_cl_cb *cmpl_list,
1077 /* complete write list CB */ 1077 /* complete write list CB */
1078 dev_dbg(&dev->pdev->dev, "complete write list cb.\n"); 1078 dev_dbg(&dev->pdev->dev, "complete write list cb.\n");
1079 list_for_each_entry_safe(pos, next, &dev->write_list.list, list) { 1079 list_for_each_entry_safe(pos, next, &dev->write_list.list, list) {
1080 cl = (struct mei_cl *)pos->file_private; 1080 cl = pos->cl;
1081 if (cl == NULL) 1081 if (cl == NULL)
1082 continue; 1082 continue;
1083 1083
@@ -1316,7 +1316,7 @@ end:
1316 1316
1317 1317
1318 list_for_each_entry_safe(cb_pos, cb_next, &complete_list.list, list) { 1318 list_for_each_entry_safe(cb_pos, cb_next, &complete_list.list, list) {
1319 cl = (struct mei_cl *)cb_pos->file_private; 1319 cl = cb_pos->cl;
1320 list_del(&cb_pos->list); 1320 list_del(&cb_pos->list);
1321 if (cl) { 1321 if (cl) {
1322 if (cl != &dev->iamthif_cl) { 1322 if (cl != &dev->iamthif_cl) {