summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/hbm.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2014-08-21 13:29:14 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-09-24 07:57:48 +0200
commit25ca6472b590e87efba314892a76bd5629c8c989 (patch)
tree05682ec6384dda9d3101adf4c8f6051704ae8ed1 /drivers/misc/mei/hbm.c
parentmei: use list for me clients book keeping (diff)
downloadlinux-25ca6472b590e87efba314892a76bd5629c8c989.tar.xz
linux-25ca6472b590e87efba314892a76bd5629c8c989.zip
mei: add me client remove functions
To support dynamic addition/remove we add wrappers for removal of me clients Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/hbm.c')
-rw-r--r--drivers/misc/mei/hbm.c21
1 files changed, 15 insertions, 6 deletions
diff --git a/drivers/misc/mei/hbm.c b/drivers/misc/mei/hbm.c
index 45659de14186..5fb177b3bfef 100644
--- a/drivers/misc/mei/hbm.c
+++ b/drivers/misc/mei/hbm.c
@@ -71,21 +71,30 @@ void mei_hbm_idle(struct mei_device *dev)
}
/**
- * mei_hbm_reset - reset hbm counters and book keeping data structurs
+ * mei_me_cl_remove_all - remove all me clients
*
* @dev: the device structure
*/
-void mei_hbm_reset(struct mei_device *dev)
+static void mei_me_cl_remove_all(struct mei_device *dev)
{
struct mei_me_client *me_cl, *next;
+ list_for_each_entry_safe(me_cl, next, &dev->me_clients, list) {
+ list_del(&me_cl->list);
+ kfree(me_cl);
+ }
+}
+/**
+ * mei_hbm_reset - reset hbm counters and book keeping data structurs
+ *
+ * @dev: the device structure
+ */
+void mei_hbm_reset(struct mei_device *dev)
+{
dev->me_client_presentation_num = 0;
dev->me_client_index = 0;
- list_for_each_entry_safe(me_cl, next, &dev->me_clients, list) {
- list_del(&me_cl->list);
- kfree(me_cl);
- }
+ mei_me_cl_remove_all(dev);
mei_hbm_idle(dev);
}