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>
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index 7e6d591..0046ca5 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -55,10 +55,8 @@
struct mei_cl_cb *next;
list_for_each_entry_safe(pos, next, &list->list, list) {
- if (pos->file_private) {
- struct mei_cl *cl_tmp;
- cl_tmp = (struct mei_cl *)pos->file_private;
- if (mei_cl_cmp_id(cl, cl_tmp))
+ if (pos->cl) {
+ if (mei_cl_cmp_id(cl, pos->cl))
list_del(&pos->list);
}
}