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/client.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/client.c')
-rw-r--r-- | drivers/misc/mei/client.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/drivers/misc/mei/client.c b/drivers/misc/mei/client.c index 244b54692b48..10d0a04f45d6 100644 --- a/drivers/misc/mei/client.c +++ b/drivers/misc/mei/client.c @@ -47,7 +47,6 @@ struct mei_me_client *mei_me_cl_by_uuid(const struct mei_device *dev, return NULL; } - /** * mei_me_cl_by_id return index to me_clients for client_id * @@ -70,6 +69,27 @@ struct mei_me_client *mei_me_cl_by_id(struct mei_device *dev, u8 client_id) return NULL; } +/** + * mei_me_cl_remove - remove me client matching uuid and client_id + * + * @dev: the device structure + * @uuid: me client uuid + * @client_id: me client address + */ +void mei_me_cl_remove(struct mei_device *dev, const uuid_le *uuid, u8 client_id) +{ + struct mei_me_client *me_cl, *next; + + list_for_each_entry_safe(me_cl, next, &dev->me_clients, list) { + if (uuid_le_cmp(*uuid, me_cl->props.protocol_name) == 0 && + me_cl->client_id == client_id) { + list_del(&me_cl->list); + kfree(me_cl); + break; + } + } +} + /** * mei_cl_cmp_id - tells if the clients are the same |