mei: use mei_io_cb_ warppers also for control flows

move the mei_io_cb_ wrappers to to iorw.c for global use
and use them also for handling control flows

Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Tomas Winkler
2012-10-11 16:35:08 +02:00
committed by Greg Kroah-Hartman
parent 601a1efa63
commit 664df38b3c
4 changed files with 94 additions and 109 deletions

View File

@@ -668,12 +668,10 @@ int mei_disconnect_host_client(struct mei_device *dev, struct mei_cl *cl)
if (cl->state != MEI_FILE_DISCONNECTING)
return 0;
cb = kzalloc(sizeof(struct mei_cl_cb), GFP_KERNEL);
cb = mei_io_cb_init(cl, NULL);
if (!cb)
return -ENOMEM;
mei_io_list_init(cb);
cb->file_private = cl;
cb->major_file_operations = MEI_CLOSE;
if (dev->mei_host_buffer_is_empty) {
dev->mei_host_buffer_is_empty = false;