void mei_stop(struct mei_device *dev) { dev_dbg(&dev->pdev->dev, "stopping the device.\n"); mei_cancel_work(dev); mei_nfc_host_exit(dev); mutex_lock(&dev->device_lock); mei_wd_stop(dev); dev->dev_state = MEI_DEV_POWER_DOWN; mei_reset(dev); mutex_unlock(&dev->device_lock); mei_watchdog_unregister(dev); }
void mei_stop(struct mei_device *dev) { dev_dbg(&dev->pdev->dev, "stopping the device.\n"); mei_cancel_work(dev); mei_nfc_host_exit(dev); mutex_lock(&dev->device_lock); mei_wd_stop(dev); dev->dev_state = MEI_DEV_POWER_DOWN; mei_reset(dev); /* move device to disabled state unconditionally */ dev->dev_state = MEI_DEV_DISABLED; mutex_unlock(&dev->device_lock); mei_watchdog_unregister(dev); }