diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2014-08-21 14:29:14 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-23 22:57:48 -0700 |
commit | 25ca6472b590e87efba314892a76bd5629c8c989 (patch) | |
tree | 05682ec6384dda9d3101adf4c8f6051704ae8ed1 /drivers/misc/mei/hbm.c | |
parent | 5ca2d3882d60c040285d0b45df731e11f5da7c64 (diff) | |
download | blackbird-op-linux-25ca6472b590e87efba314892a76bd5629c8c989.tar.gz blackbird-op-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.c | 21 |
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); } |