summaryrefslogtreecommitdiff
path: root/drivers/misc/mei/nfc.c
diff options
context:
space:
mode:
authorTomas Winkler <tomas.winkler@intel.com>2013-11-11 15:26:06 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-11-27 23:11:28 +0400
commitdc844b0d99b8533d6174e5b9a369f7c2cdacfe66 (patch)
tree091142af7d38c69732b3a2cf955bae1770c49119 /drivers/misc/mei/nfc.c
parent6ce4eac1f600b34f2f7f58f9cd8f0503d79e42ae (diff)
downloadlinux-dc844b0d99b8533d6174e5b9a369f7c2cdacfe66.tar.xz
mei: remove flash_work_queue
Cancel each work properly and remove flash_work_queue. Quoting documentation: In most situations flushing the entire workqueue is overkill; you merely need to know that a particular work item isn't queued and isn't running. In such cases you should use cancel_delayed_work_sync() or cancel_work_sync() instead. Signed-off-by: Tomas Winkler <tomas.winkler@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/nfc.c')
-rw-r--r--drivers/misc/mei/nfc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/misc/mei/nfc.c b/drivers/misc/mei/nfc.c
index 994ca4aff1a3..0a892205ce7e 100644
--- a/drivers/misc/mei/nfc.c
+++ b/drivers/misc/mei/nfc.c
@@ -547,12 +547,16 @@ err:
return ret;
}
-void mei_nfc_host_exit(void)
+void mei_nfc_host_exit(struct mei_device *dev)
{
struct mei_nfc_dev *ndev = &nfc_dev;
+ cancel_work_sync(&ndev->init_work);
+
+ mutex_lock(&dev->device_lock);
if (ndev->cl && ndev->cl->device)
mei_cl_remove_device(ndev->cl->device);
mei_nfc_free(ndev);
+ mutex_unlock(&dev->device_lock);
}