mei: amthif: drop iamthif_current_cb

iamthif_current_cb was used in request cancel in amthif code.
Now a canceled request is discarded only at the end of the processing
and the variable lost its purpose and can be safely removed.

Signed-off-by: Alexander Usyskin <alexander.usyskin@intel.com>
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Alexander Usyskin 2016-05-24 16:03:37 -04:00 committed by Greg Kroah-Hartman
parent 32a1dc1d02
commit bca7dbacfd
3 changed files with 0 additions and 10 deletions

View File

@ -47,7 +47,6 @@ const uuid_le mei_amthif_guid = UUID_LE(0x12f80028, 0xb4b7, 0x4b2d,
void mei_amthif_reset_params(struct mei_device *dev) void mei_amthif_reset_params(struct mei_device *dev)
{ {
/* reset iamthif parameters. */ /* reset iamthif parameters. */
dev->iamthif_current_cb = NULL;
dev->iamthif_canceled = false; dev->iamthif_canceled = false;
dev->iamthif_state = MEI_IAMTHIF_IDLE; dev->iamthif_state = MEI_IAMTHIF_IDLE;
dev->iamthif_stall_timer = 0; dev->iamthif_stall_timer = 0;
@ -213,7 +212,6 @@ static int mei_amthif_read_start(struct mei_cl *cl, const struct file *file)
dev->iamthif_state = MEI_IAMTHIF_READING; dev->iamthif_state = MEI_IAMTHIF_READING;
dev->iamthif_fp = cb->fp; dev->iamthif_fp = cb->fp;
dev->iamthif_current_cb = cb;
return 0; return 0;
err: err:
@ -240,7 +238,6 @@ static int mei_amthif_send_cmd(struct mei_cl *cl, struct mei_cl_cb *cb)
dev = cl->dev; dev = cl->dev;
dev->iamthif_state = MEI_IAMTHIF_WRITING; dev->iamthif_state = MEI_IAMTHIF_WRITING;
dev->iamthif_current_cb = cb;
dev->iamthif_fp = cb->fp; dev->iamthif_fp = cb->fp;
dev->iamthif_canceled = false; dev->iamthif_canceled = false;
@ -407,7 +404,6 @@ void mei_amthif_complete(struct mei_cl *cl, struct mei_cl_cb *cb)
mei_io_cb_free(cb); mei_io_cb_free(cb);
return; return;
} }
dev->iamthif_current_cb = NULL;
dev->iamthif_state = MEI_IAMTHIF_IDLE; dev->iamthif_state = MEI_IAMTHIF_IDLE;
dev->iamthif_fp = NULL; dev->iamthif_fp = NULL;
if (!dev->iamthif_canceled) { if (!dev->iamthif_canceled) {
@ -430,7 +426,6 @@ void mei_amthif_complete(struct mei_cl *cl, struct mei_cl_cb *cb)
mei_io_cb_free(cb); mei_io_cb_free(cb);
} }
dev->iamthif_current_cb = NULL;
dev->iamthif_stall_timer = 0; dev->iamthif_stall_timer = 0;
mei_amthif_run_next_cmd(dev); mei_amthif_run_next_cmd(dev);
break; break;

View File

@ -515,9 +515,6 @@ void mei_timer(struct work_struct *work)
dev_err(dev->dev, "timer: amthif hanged.\n"); dev_err(dev->dev, "timer: amthif hanged.\n");
mei_reset(dev); mei_reset(dev);
mei_io_cb_free(dev->iamthif_current_cb);
dev->iamthif_current_cb = NULL;
dev->iamthif_fp = NULL; dev->iamthif_fp = NULL;
mei_amthif_run_next_cmd(dev); mei_amthif_run_next_cmd(dev);
} }

View File

@ -400,7 +400,6 @@ const char *mei_pg_state_str(enum mei_pg_state state);
* @amthif_cmd_list : amthif list for cmd waiting * @amthif_cmd_list : amthif list for cmd waiting
* @iamthif_fp : file for current amthif operation * @iamthif_fp : file for current amthif operation
* @iamthif_cl : amthif host client * @iamthif_cl : amthif host client
* @iamthif_current_cb : amthif current operation callback
* @iamthif_open_count : number of opened amthif connections * @iamthif_open_count : number of opened amthif connections
* @iamthif_stall_timer : timer to detect amthif hang * @iamthif_stall_timer : timer to detect amthif hang
* @iamthif_state : amthif processor state * @iamthif_state : amthif processor state
@ -485,7 +484,6 @@ struct mei_device {
/* driver managed amthif list for reading completed amthif cmd data */ /* driver managed amthif list for reading completed amthif cmd data */
const struct file *iamthif_fp; const struct file *iamthif_fp;
struct mei_cl iamthif_cl; struct mei_cl iamthif_cl;
struct mei_cl_cb *iamthif_current_cb;
long iamthif_open_count; long iamthif_open_count;
u32 iamthif_stall_timer; u32 iamthif_stall_timer;
enum iamthif_states iamthif_state; enum iamthif_states iamthif_state;