IVTV_DEBUG_INFO("base addr: 0x%08x\n", itv->base_addr);
+ mutex_lock(&itv->serialize_lock);
+
/* PCI Device Setup */
if ((retval = ivtv_setup_pci(itv, dev, pci_id)) != 0) {
if (retval == -EIO)
IVTV_ERR("Failed to register irq %d\n", retval);
goto free_streams;
}
+ mutex_unlock(&itv->serialize_lock);
IVTV_INFO("Initialized card #%d: %s\n", itv->num, itv->card_name);
return 0;
release_mem_region(itv->base_addr + IVTV_DECODER_OFFSET, IVTV_DECODER_SIZE);
free_workqueue:
destroy_workqueue(itv->irq_work_queues);
+ mutex_unlock(&itv->serialize_lock);
err:
if (retval == 0)
retval = -ENODEV;
{
struct osd_info *oi = itv->osd_info;
+ mutex_lock(&itv->serialize_lock);
if (ivtv_init_on_first_open(itv)) {
+ mutex_unlock(&itv->serialize_lock);
IVTV_FB_ERR("Failed to initialize ivtv\n");
return -ENXIO;
}
+ mutex_unlock(&itv->serialize_lock);
ivtv_fb_get_framebuffer(itv, &oi->video_rbase, &oi->video_buffer_size);