diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-15 01:15:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2013-06-15 01:15:36 -0400 |
commit | 9bb92855e3491e3f84a1477f14810f7c59fdbc73 (patch) | |
tree | eb61cb5115803cb5a758a6152b83cf96a2206f21 | |
parent | 3ad2e318a24124c53cc6390b5bfbd7613d9c2145 (diff) | |
parent | 42f132febff3b7b42c6c9dbfc151f29233be3132 (diff) |
Merge tag 'char-misc-3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc
Pull char / misc fixes from Greg Kroah-Hartman:
"Here are some small mei driver fixes for 3.10-rc6 that fix some
reported problems"
* tag 'char-misc-3.10-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc:
mei: me: clear interrupts on the resume path
mei: nfc: fix nfc device freeing
mei: init: Flush scheduled work before resetting the device
-rw-r--r-- | drivers/misc/mei/init.c | 4 | ||||
-rw-r--r-- | drivers/misc/mei/nfc.c | 2 | ||||
-rw-r--r-- | drivers/misc/mei/pci-me.c | 1 |
3 files changed, 5 insertions, 2 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index 713d89fedc46..f580d30bb784 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c | |||
@@ -197,6 +197,8 @@ void mei_stop(struct mei_device *dev) | |||
197 | { | 197 | { |
198 | dev_dbg(&dev->pdev->dev, "stopping the device.\n"); | 198 | dev_dbg(&dev->pdev->dev, "stopping the device.\n"); |
199 | 199 | ||
200 | flush_scheduled_work(); | ||
201 | |||
200 | mutex_lock(&dev->device_lock); | 202 | mutex_lock(&dev->device_lock); |
201 | 203 | ||
202 | cancel_delayed_work(&dev->timer_work); | 204 | cancel_delayed_work(&dev->timer_work); |
@@ -210,8 +212,6 @@ void mei_stop(struct mei_device *dev) | |||
210 | 212 | ||
211 | mutex_unlock(&dev->device_lock); | 213 | mutex_unlock(&dev->device_lock); |
212 | 214 | ||
213 | flush_scheduled_work(); | ||
214 | |||
215 | mei_watchdog_unregister(dev); | 215 | mei_watchdog_unregister(dev); |
216 | } | 216 | } |
217 | EXPORT_SYMBOL_GPL(mei_stop); | 217 | EXPORT_SYMBOL_GPL(mei_stop); |
diff --git a/drivers/misc/mei/nfc.c b/drivers/misc/mei/nfc.c index 3adf8a70f26e..d0c6907dfd92 100644 --- a/drivers/misc/mei/nfc.c +++ b/drivers/misc/mei/nfc.c | |||
@@ -142,6 +142,8 @@ static void mei_nfc_free(struct mei_nfc_dev *ndev) | |||
142 | mei_cl_unlink(ndev->cl_info); | 142 | mei_cl_unlink(ndev->cl_info); |
143 | kfree(ndev->cl_info); | 143 | kfree(ndev->cl_info); |
144 | } | 144 | } |
145 | |||
146 | memset(ndev, 0, sizeof(struct mei_nfc_dev)); | ||
145 | } | 147 | } |
146 | 148 | ||
147 | static int mei_nfc_build_bus_name(struct mei_nfc_dev *ndev) | 149 | static int mei_nfc_build_bus_name(struct mei_nfc_dev *ndev) |
diff --git a/drivers/misc/mei/pci-me.c b/drivers/misc/mei/pci-me.c index a727464e9c3f..0f268329bd3a 100644 --- a/drivers/misc/mei/pci-me.c +++ b/drivers/misc/mei/pci-me.c | |||
@@ -325,6 +325,7 @@ static int mei_me_pci_resume(struct device *device) | |||
325 | 325 | ||
326 | mutex_lock(&dev->device_lock); | 326 | mutex_lock(&dev->device_lock); |
327 | dev->dev_state = MEI_DEV_POWER_UP; | 327 | dev->dev_state = MEI_DEV_POWER_UP; |
328 | mei_clear_interrupts(dev); | ||
328 | mei_reset(dev, 1); | 329 | mei_reset(dev, 1); |
329 | mutex_unlock(&dev->device_lock); | 330 | mutex_unlock(&dev->device_lock); |
330 | 331 | ||