diff options
author | Ingo Molnar <mingo@elte.hu> | 2008-10-19 19:04:47 +0200 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-10-19 19:04:47 +0200 |
commit | 3e10e879a8c334a5927d800a3663a24d562cfa31 (patch) | |
tree | 5d18bc7e38c986a044e99aa0d0a4aff4931ec7d0 /drivers/media/video/meye.c | |
parent | 98d9c66ab07471006fd7910cb16453581c41a3e7 (diff) | |
parent | 0cfd81031a26717fe14380d18275f8e217571615 (diff) |
Merge branch 'linus' into tracing-v28-for-linus-v3
Conflicts:
init/main.c
kernel/module.c
scripts/bootgraph.pl
Diffstat (limited to 'drivers/media/video/meye.c')
-rw-r--r-- | drivers/media/video/meye.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/media/video/meye.c b/drivers/media/video/meye.c index a9ef7802eb5..6418f4a78f2 100644 --- a/drivers/media/video/meye.c +++ b/drivers/media/video/meye.c @@ -843,17 +843,16 @@ again: static int meye_open(struct inode *inode, struct file *file) { - int i, err; + int i; - err = video_exclusive_open(inode, file); - if (err < 0) - return err; + if (test_and_set_bit(0, &meye.in_use)) + return -EBUSY; mchip_hic_stop(); if (mchip_dma_alloc()) { printk(KERN_ERR "meye: mchip framebuffer allocation failed\n"); - video_exclusive_release(inode, file); + clear_bit(0, &meye.in_use); return -ENOBUFS; } @@ -868,7 +867,7 @@ static int meye_release(struct inode *inode, struct file *file) { mchip_hic_stop(); mchip_dma_free(); - video_exclusive_release(inode, file); + clear_bit(0, &meye.in_use); return 0; } @@ -1774,6 +1773,7 @@ static int __devinit meye_probe(struct pci_dev *pcidev, goto outnotdev; } + ret = -ENOMEM; meye.mchip_dev = pcidev; meye.video_dev = video_device_alloc(); if (!meye.video_dev) { @@ -1781,7 +1781,6 @@ static int __devinit meye_probe(struct pci_dev *pcidev, goto outnotdev; } - ret = -ENOMEM; meye.grab_temp = vmalloc(MCHIP_NB_PAGES_MJPEG * PAGE_SIZE); if (!meye.grab_temp) { printk(KERN_ERR "meye: grab buffer allocation failed\n"); |