diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-26 16:09:30 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-26 16:09:30 -0700 |
commit | 8c876be81a1f2f0ab33ffb2b00871e65c7a658b3 (patch) | |
tree | 60426265759ab14b00c94a791520f140062bb57c /drivers/misc/mei/init.c | |
parent | 02dbd0ff5448d4da0c6e9d59c897f3e31a16d51a (diff) | |
parent | 347e0899b1c75d907f01ac883ca38d37fe9bfa42 (diff) |
Merge branch 'char-misc-linus' into char-misc-next
This picks up the MEI fixes that we need in this branch now.
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/mei/init.c')
-rw-r--r-- | drivers/misc/mei/init.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/drivers/misc/mei/init.c b/drivers/misc/mei/init.c index fc3d97ce830..1ab1fb1db07 100644 --- a/drivers/misc/mei/init.c +++ b/drivers/misc/mei/init.c @@ -199,6 +199,24 @@ void mei_reset(struct mei_device *dev, int interrupts_enabled) mei_cl_all_write_clear(dev); } +void mei_stop(struct mei_device *dev) +{ + dev_dbg(&dev->pdev->dev, "stopping the device.\n"); + + mutex_lock(&dev->device_lock); + + cancel_delayed_work(&dev->timer_work); + + mei_wd_stop(dev); + + dev->dev_state = MEI_DEV_POWER_DOWN; + mei_reset(dev, 0); + + mutex_unlock(&dev->device_lock); + + flush_scheduled_work(); +} + |