aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx23885/cx23885-417.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-417.c')
-rw-r--r--drivers/media/video/cx23885/cx23885-417.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c
index 7b0e8c01692e..395c11fa47ce 100644
--- a/drivers/media/video/cx23885/cx23885-417.c
+++ b/drivers/media/video/cx23885/cx23885-417.c
@@ -36,7 +36,6 @@
36#include <media/cx2341x.h> 36#include <media/cx2341x.h>
37 37
38#include "cx23885.h" 38#include "cx23885.h"
39#include "media/cx2341x.h"
40 39
41#define CX23885_FIRM_IMAGE_SIZE 376836 40#define CX23885_FIRM_IMAGE_SIZE 376836
42#define CX23885_FIRM_IMAGE_NAME "v4l-cx23885-enc.fw" 41#define CX23885_FIRM_IMAGE_NAME "v4l-cx23885-enc.fw"
@@ -632,7 +631,7 @@ int mc417_memory_read(struct cx23885_dev *dev, u32 address, u32 *value)
632/* ------------------------------------------------------------------ */ 631/* ------------------------------------------------------------------ */
633 632
634/* MPEG encoder API */ 633/* MPEG encoder API */
635char *cmd_to_str(int cmd) 634static char *cmd_to_str(int cmd)
636{ 635{
637 switch (cmd) { 636 switch (cmd) {
638 case CX2341X_ENC_PING_FW: 637 case CX2341X_ENC_PING_FW:
@@ -1583,6 +1582,7 @@ static int mpeg_open(struct inode *inode, struct file *file)
1583 1582
1584 dprintk(2, "%s()\n", __func__); 1583 dprintk(2, "%s()\n", __func__);
1585 1584
1585 lock_kernel();
1586 list_for_each(list, &cx23885_devlist) { 1586 list_for_each(list, &cx23885_devlist) {
1587 h = list_entry(list, struct cx23885_dev, devlist); 1587 h = list_entry(list, struct cx23885_dev, devlist);
1588 if (h->v4l_device->minor == minor) { 1588 if (h->v4l_device->minor == minor) {
@@ -1591,13 +1591,17 @@ static int mpeg_open(struct inode *inode, struct file *file)
1591 } 1591 }
1592 } 1592 }
1593 1593
1594 if (dev == NULL) 1594 if (dev == NULL) {
1595 unlock_kernel();
1595 return -ENODEV; 1596 return -ENODEV;
1597 }
1596 1598
1597 /* allocate + initialize per filehandle data */ 1599 /* allocate + initialize per filehandle data */
1598 fh = kzalloc(sizeof(*fh), GFP_KERNEL); 1600 fh = kzalloc(sizeof(*fh), GFP_KERNEL);
1599 if (NULL == fh) 1601 if (NULL == fh) {
1602 unlock_kernel();
1600 return -ENOMEM; 1603 return -ENOMEM;
1604 }
1601 1605
1602 file->private_data = fh; 1606 file->private_data = fh;
1603 fh->dev = dev; 1607 fh->dev = dev;
@@ -1608,6 +1612,7 @@ static int mpeg_open(struct inode *inode, struct file *file)
1608 V4L2_FIELD_INTERLACED, 1612 V4L2_FIELD_INTERLACED,
1609 sizeof(struct cx23885_buffer), 1613 sizeof(struct cx23885_buffer),
1610 fh); 1614 fh);
1615 unlock_kernel();
1611 1616
1612 return 0; 1617 return 0;
1613} 1618}