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.wink...@intel.com>
---
 drivers/misc/mei/init.c | 4 ++--
 1 file 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);
-- 
2.4.3

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to