summaryrefslogtreecommitdiffstats
path: root/drivers/misc/mei/init.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2015-02-10 09:39:31 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-03-02 04:36:59 +0100
commitb7d885145538ddedb1ae23b782ab7c7c0a856e9f (patch)
tree9470b5807362a068e85487a429fb3b3f543af53e /drivers/misc/mei/init.c
parentDrivers: hv: vmbus: Suport an API to send packet with additional control (diff)
downloadlinux-b7d885145538ddedb1ae23b782ab7c7c0a856e9f.tar.xz
linux-b7d885145538ddedb1ae23b782ab7c7c0a856e9f.zip
mei: revamp me clients list handling
1. Use rw lock to access the me_clients list 2. Reuse already defined find functions also when removing particular me client 3. Add wrappers for addition and deletion Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/init.c')
-rw-r--r--drivers/misc/mei/init.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c
index 9306219d5675..106c054f573f 100644
--- a/drivers/misc/mei/init.c
+++ b/drivers/misc/mei/init.c
@@ -387,6 +387,7 @@ void mei_device_init(struct mei_device *dev,
INIT_LIST_HEAD(&dev->device_list);
INIT_LIST_HEAD(&dev->me_clients);
mutex_init(&dev->device_lock);
+ init_rwsem(&dev->me_clients_rwsem);
init_waitqueue_head(&dev->wait_hw_ready);
init_waitqueue_head(&dev->wait_pg);
init_waitqueue_head(&dev->wait_hbm_start);