video_unregister_device(dev->video_dev);
wake_up_interruptible(&dev->wait_data);
wake_up_interruptible(&dev->wait_buffer);
+ mutex_unlock(&dev->io_mutex);
msleep(100);
flush_workqueue(dev->workqueue);
+ mutex_lock(&dev->io_mutex);
hdpvr_cancel_queue(dev);
destroy_workqueue(dev->workqueue);
mutex_unlock(&dev->io_mutex);
dev->status = STATUS_SHUTTING_DOWN;
hdpvr_config_call(dev, CTRL_STOP_STREAMING_VALUE, 0x00);
+ mutex_unlock(&dev->io_mutex);
wake_up_interruptible(&dev->wait_buffer);
msleep(50);
flush_workqueue(dev->workqueue);
+ mutex_lock(&dev->io_mutex);
/* kill the still outstanding urbs */
hdpvr_cancel_queue(dev);
default:
v4l2_dbg(MSG_INFO, hdpvr_debug, dev->video_dev,
"Unsupported encoder cmd %d\n", a->cmd);
- return -EINVAL;
+ res = -EINVAL;
}
mutex_unlock(&dev->io_mutex);
return res;