summaryrefslogtreecommitdiffstats
path: root/drivers/misc
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2015-10-13 14:02:37 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-10-18 06:45:05 +0200
commit97ccf63f42721e758bb3cd1aa8967a89d26ed0bb (patch)
tree719529da2aca373bbac26180e6ad333accd9cee9 /drivers/misc
parentW1: w1-gpio - switch to using dev_pm_ops (diff)
downloadlinux-97ccf63f42721e758bb3cd1aa8967a89d26ed0bb.tar.xz
linux-97ccf63f42721e758bb3cd1aa8967a89d26ed0bb.zip
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>
Diffstat (limited to 'drivers/misc')
-rw-r--r--drivers/misc/mei/init.c4
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);