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>
Esse commit está contido em:
Tomas Winkler
2014-08-21 14:29:14 +03:00
commit de Greg Kroah-Hartman
commit 25ca6472b5
3 arquivos alterados com 38 adições e 7 exclusões

Ver arquivo

@@ -70,6 +70,20 @@ void mei_hbm_idle(struct mei_device *dev)
dev->hbm_state = MEI_HBM_IDLE;
}
/**
* mei_me_cl_remove_all - remove all me clients
*
* @dev: the device structure
*/
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
*
@@ -77,15 +91,10 @@ void mei_hbm_idle(struct mei_device *dev)
*/
void mei_hbm_reset(struct mei_device *dev)
{
struct mei_me_client *me_cl, *next;
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);
}