diff options
author | Tomas Winkler <tomas.winkler@intel.com> | 2015-10-13 15:02:37 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-17 21:45:05 -0700 |
commit | 97ccf63f42721e758bb3cd1aa8967a89d26ed0bb (patch) | |
tree | 719529da2aca373bbac26180e6ad333accd9cee9 | |
parent | 36fccce0e82a5ccd1c7f3861398f3303bff4669a (diff) | |
download | linux-97ccf63f42721e758bb3cd1aa8967a89d26ed0bb.tar.bz2 |
mei: cancel driver workers only after client devices were removed
In process of client devices removal from the bus there still
might be communication between a driver and the mei device
hence we need to cancel supporting workers only after all
the client devices were removed.
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/misc/mei/init.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index e374661652cd..3edafc8d3ad4 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c @@ -329,10 +329,10 @@ void mei_stop(struct mei_device *dev) { dev_dbg(dev->dev, "stopping the device.\n"); - mei_cancel_work(dev); - mei_cl_bus_remove_devices(dev); + mei_cancel_work(dev); + mutex_lock(&dev->device_lock); mei_wd_stop(dev); |