aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Usyskin <alexander.usyskin@intel.com>2016-06-16 10:58:59 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-08-30 08:36:40 -0400
commitc85dba9e87376aa8e08fa7b024df562d0fda189b (patch)
tree77d2e4e2c1c6190c36e9722e6ca110df89e574c6
parenta808c80cdaa83939b220176fcdffca8385d88ba6 (diff)
mei: amthif: drop mei_clear_lists function
Open code mei_clear_lists into its only caller mei_amthif_releas and drop unused parameter 'dev' form from mei_clear_list function. 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.c27
1 files changed, 5 insertions, 22 deletions
diff --git a/drivers/misc/mei/amthif.c b/drivers/misc/mei/amthif.c
index e346af17d9f4..26568c5beb25 100644
--- a/drivers/misc/mei/amthif.c
+++ b/drivers/misc/mei/amthif.c
@@ -408,15 +408,14 @@ void mei_amthif_complete(struct mei_cl *cl, struct mei_cl_cb *cb)
408 * mei_clear_list - removes all callbacks associated with file 408 * mei_clear_list - removes all callbacks associated with file
409 * from mei_cb_list 409 * from mei_cb_list
410 * 410 *
411 * @dev: device structure.
412 * @file: file structure 411 * @file: file structure
413 * @mei_cb_list: callbacks list 412 * @mei_cb_list: callbacks list
414 * 413 *
415 * mei_clear_list is called to clear resources associated with file 414 * mei_clear_list is called to clear resources associated with file
416 * when application calls close function or Ctrl-C was pressed 415 * when application calls close function or Ctrl-C was pressed
417 */ 416 */
418static void mei_clear_list(struct mei_device *dev, 417static void mei_clear_list(const struct file *file,
419 const struct file *file, struct list_head *mei_cb_list) 418 struct list_head *mei_cb_list)
420{ 419{
421 struct mei_cl_cb *cb, *next; 420 struct mei_cl_cb *cb, *next;
422 421
@@ -426,24 +425,6 @@ static void mei_clear_list(struct mei_device *dev,
426} 425}
427 426
428/** 427/**
429 * mei_clear_lists - removes all callbacks associated with file
430 *
431 * @dev: device structure
432 * @file: file structure
433 *
434 * mei_clear_lists is called to clear resources associated with file
435 * when application calls close function or Ctrl-C was pressed
436 */
437static void mei_clear_lists(struct mei_device *dev, const struct file *file)
438{
439 struct mei_cl *cl = &dev->iamthif_cl;
440
441 mei_clear_list(dev, file, &dev->amthif_cmd_list.list);
442 mei_clear_list(dev, file, &cl->rd_completed);
443 mei_clear_list(dev, file, &dev->ctrl_rd_list.list);
444}
445
446/**
447* mei_amthif_release - the release function 428* mei_amthif_release - the release function
448* 429*
449* @dev: device structure 430* @dev: device structure
@@ -465,7 +446,9 @@ int mei_amthif_release(struct mei_device *dev, struct file *file)
465 dev->iamthif_canceled = true; 446 dev->iamthif_canceled = true;
466 } 447 }
467 448
468 mei_clear_lists(dev, file); 449 mei_clear_list(file, &dev->amthif_cmd_list.list);
450 mei_clear_list(file, &cl->rd_completed);
451 mei_clear_list(file, &dev->ctrl_rd_list.list);
469 452
470 return 0; 453 return 0;
471} 454}