mei: rename mei_free_cb_private to mei_io_cb_free
1. cb_private was an old name that we depriacated in earlier
cleanups
2. we also group the funcion declaration with other _io_
functions
3. Don't check cb for NULL as mei_io_cb_free is NULL safe
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/misc/mei/main.c b/drivers/misc/mei/main.c
index 2e46291..518e07e 100644
--- a/drivers/misc/mei/main.c
+++ b/drivers/misc/mei/main.c
@@ -124,7 +124,7 @@
mei_send_flow_control(dev, &dev->iamthif_cl);
}
/* free all allocated buffers */
- mei_free_cb_private(cb_pos);
+ mei_io_cb_free(cb_pos);
cb_pos = NULL;
removed = true;
}
@@ -169,7 +169,7 @@
/* check file and iamthif current cb association */
if (dev->iamthif_current_cb->file_object == file) {
/* remove cb */
- mei_free_cb_private(dev->iamthif_current_cb);
+ mei_io_cb_free(dev->iamthif_current_cb);
dev->iamthif_current_cb = NULL;
removed = true;
}
@@ -332,7 +332,7 @@
file->private_data = NULL;
if (cb) {
- mei_free_cb_private(cb);
+ mei_io_cb_free(cb);
cb = NULL;
}
@@ -504,7 +504,7 @@
/* Remove entry from read list */
if (cb_pos)
list_del(&cb_pos->list);
- mei_free_cb_private(cb);
+ mei_io_cb_free(cb);
cl->reading_state = MEI_IDLE;
cl->read_cb = NULL;
cl->read_pending = 0;
@@ -651,7 +651,7 @@
cl->reading_state == MEI_READ_COMPLETE) {
*offset = 0;
list_del(&write_cb->list);
- mei_free_cb_private(write_cb);
+ mei_io_cb_free(write_cb);
write_cb = NULL;
}
}
@@ -663,7 +663,7 @@
write_cb = find_read_list_entry(dev, cl);
if (write_cb) {
list_del(&write_cb->list);
- mei_free_cb_private(write_cb);
+ mei_io_cb_free(write_cb);
write_cb = NULL;
cl->reading_state = MEI_IDLE;
cl->read_cb = NULL;
@@ -778,7 +778,7 @@
unlock_dev:
mutex_unlock(&dev->device_lock);
- mei_free_cb_private(write_cb);
+ mei_io_cb_free(write_cb);
return rets;
}