diff options
author | Alexander Usyskin <alexander.usyskin@intel.com> | 2016-05-24 16:03:37 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-08-30 08:35:14 -0400 |
commit | bca7dbacfd4c7f1f069a70e241e39aea5bd85808 (patch) | |
tree | d63ac7c7f667a12c4b70abc0d8adeba73b58441e | |
parent | 32a1dc1d02eb41196903278f40d6a4aef66ce535 (diff) |
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>
-rw-r--r-- | drivers/misc/mei/amthif.c | 5 | ||||
-rw-r--r-- | drivers/misc/mei/interrupt.c | 3 | ||||
-rw-r--r-- | drivers/misc/mei/mei_dev.h | 2 |
3 files changed, 0 insertions, 10 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c index 0cded8aa72c0..b602fd3b914c 100644 --- a/drivers/misc/mei/amthif.c +++ b/drivers/misc/mei/amthif.c | |||
@@ -47,7 +47,6 @@ const uuid_le mei_amthif_guid = UUID_LE(0x12f80028, 0xb4b7, 0x4b2d, | |||
47 | void mei_amthif_reset_params(struct mei_device *dev) | 47 | void mei_amthif_reset_params(struct mei_device *dev) |
48 | { | 48 | { |
49 | /* reset iamthif parameters. */ | 49 | /* reset iamthif parameters. */ |
50 | dev->iamthif_current_cb = NULL; | ||
51 | dev->iamthif_canceled = false; | 50 | dev->iamthif_canceled = false; |
52 | dev->iamthif_state = MEI_IAMTHIF_IDLE; | 51 | dev->iamthif_state = MEI_IAMTHIF_IDLE; |
53 | dev->iamthif_stall_timer = 0; | 52 | dev->iamthif_stall_timer = 0; |
@@ -213,7 +212,6 @@ static int mei_amthif_read_start(struct mei_cl *cl, const struct file *file) | |||
213 | 212 | ||
214 | dev->iamthif_state = MEI_IAMTHIF_READING; | 213 | dev->iamthif_state = MEI_IAMTHIF_READING; |
215 | dev->iamthif_fp = cb->fp; | 214 | dev->iamthif_fp = cb->fp; |
216 | dev->iamthif_current_cb = cb; | ||
217 | 215 | ||
218 | return 0; | 216 | return 0; |
219 | err: | 217 | err: |
@@ -240,7 +238,6 @@ static int mei_amthif_send_cmd(struct mei_cl *cl, struct mei_cl_cb *cb) | |||
240 | dev = cl->dev; | 238 | dev = cl->dev; |
241 | 239 | ||
242 | dev->iamthif_state = MEI_IAMTHIF_WRITING; | 240 | dev->iamthif_state = MEI_IAMTHIF_WRITING; |
243 | dev->iamthif_current_cb = cb; | ||
244 | dev->iamthif_fp = cb->fp; | 241 | dev->iamthif_fp = cb->fp; |
245 | dev->iamthif_canceled = false; | 242 | dev->iamthif_canceled = false; |
246 | 243 | ||
@@ -407,7 +404,6 @@ void mei_amthif_complete(struct mei_cl *cl, struct mei_cl_cb *cb) | |||
407 | mei_io_cb_free(cb); | 404 | mei_io_cb_free(cb); |
408 | return; | 405 | return; |
409 | } | 406 | } |
410 | dev->iamthif_current_cb = NULL; | ||
411 | dev->iamthif_state = MEI_IAMTHIF_IDLE; | 407 | dev->iamthif_state = MEI_IAMTHIF_IDLE; |
412 | dev->iamthif_fp = NULL; | 408 | dev->iamthif_fp = NULL; |
413 | if (!dev->iamthif_canceled) { | 409 | if (!dev->iamthif_canceled) { |
@@ -430,7 +426,6 @@ void mei_amthif_complete(struct mei_cl *cl, struct mei_cl_cb *cb) | |||
430 | mei_io_cb_free(cb); | 426 | mei_io_cb_free(cb); |
431 | } | 427 | } |
432 | 428 | ||
433 | dev->iamthif_current_cb = NULL; | ||
434 | dev->iamthif_stall_timer = 0; | 429 | dev->iamthif_stall_timer = 0; |
435 | mei_amthif_run_next_cmd(dev); | 430 | mei_amthif_run_next_cmd(dev); |
436 | break; | 431 | break; |
diff --git a/drivers/misc/mei/interrupt.c b/drivers/misc/mei/interrupt.c index 38db1c3d4f14..436ecda3935e 100644 --- a/drivers/misc/mei/interrupt.c +++ b/drivers/misc/mei/interrupt.c | |||
@@ -515,9 +515,6 @@ void mei_timer(struct work_struct *work) | |||
515 | dev_err(dev->dev, "timer: amthif hanged.\n"); | 515 | dev_err(dev->dev, "timer: amthif hanged.\n"); |
516 | mei_reset(dev); | 516 | mei_reset(dev); |
517 | 517 | ||
518 | mei_io_cb_free(dev->iamthif_current_cb); | ||
519 | dev->iamthif_current_cb = NULL; | ||
520 | |||
521 | dev->iamthif_fp = NULL; | 518 | dev->iamthif_fp = NULL; |
522 | mei_amthif_run_next_cmd(dev); | 519 | mei_amthif_run_next_cmd(dev); |
523 | } | 520 | } |
diff --git a/drivers/misc/mei/mei_dev.h b/drivers/misc/mei/mei_dev.h index fa6007707048..d7b68063ace1 100644 --- a/drivers/misc/mei/mei_dev.h +++ b/drivers/misc/mei/mei_dev.h | |||
@@ -400,7 +400,6 @@ const char *mei_pg_state_str(enum mei_pg_state state); | |||
400 | * @amthif_cmd_list : amthif list for cmd waiting | 400 | * @amthif_cmd_list : amthif list for cmd waiting |
401 | * @iamthif_fp : file for current amthif operation | 401 | * @iamthif_fp : file for current amthif operation |
402 | * @iamthif_cl : amthif host client | 402 | * @iamthif_cl : amthif host client |
403 | * @iamthif_current_cb : amthif current operation callback | ||
404 | * @iamthif_open_count : number of opened amthif connections | 403 | * @iamthif_open_count : number of opened amthif connections |
405 | * @iamthif_stall_timer : timer to detect amthif hang | 404 | * @iamthif_stall_timer : timer to detect amthif hang |
406 | * @iamthif_state : amthif processor state | 405 | * @iamthif_state : amthif processor state |
@@ -485,7 +484,6 @@ struct mei_device { | |||
485 | /* driver managed amthif list for reading completed amthif cmd data */ | 484 | /* driver managed amthif list for reading completed amthif cmd data */ |
486 | const struct file *iamthif_fp; | 485 | const struct file *iamthif_fp; |
487 | struct mei_cl iamthif_cl; | 486 | struct mei_cl iamthif_cl; |
488 | struct mei_cl_cb *iamthif_current_cb; | ||
489 | long iamthif_open_count; | 487 | long iamthif_open_count; |
490 | u32 iamthif_stall_timer; | 488 | u32 iamthif_stall_timer; |
491 | enum iamthif_states iamthif_state; | 489 | enum iamthif_states iamthif_state; |