diff options
Diffstat (limited to 'drivers/media/video/cx23885/cx23885-417.c')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-417.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/media/video/cx23885/cx23885-417.c b/drivers/media/video/cx23885/cx23885-417.c index 798d24024353..8f1db57bd1dd 100644 --- a/drivers/media/video/cx23885/cx23885-417.c +++ b/drivers/media/video/cx23885/cx23885-417.c | |||
@@ -1027,12 +1027,13 @@ static int cx23885_initialize_codec(struct cx23885_dev *dev) | |||
1027 | printk(KERN_ERR "%s() f/w load failed\n", __func__); | 1027 | printk(KERN_ERR "%s() f/w load failed\n", __func__); |
1028 | return retval; | 1028 | return retval; |
1029 | } | 1029 | } |
1030 | dev->cx23417_mailbox = cx23885_find_mailbox(dev); | 1030 | retval = cx23885_find_mailbox(dev); |
1031 | if (dev->cx23417_mailbox < 0) { | 1031 | if (retval < 0) { |
1032 | printk(KERN_ERR "%s() mailbox < 0, error\n", | 1032 | printk(KERN_ERR "%s() mailbox < 0, error\n", |
1033 | __func__); | 1033 | __func__); |
1034 | return -1; | 1034 | return -1; |
1035 | } | 1035 | } |
1036 | dev->cx23417_mailbox = retval; | ||
1036 | retval = cx23885_api_cmd(dev, CX2341X_ENC_PING_FW, 0, 0); | 1037 | retval = cx23885_api_cmd(dev, CX2341X_ENC_PING_FW, 0, 0); |
1037 | if (retval < 0) { | 1038 | if (retval < 0) { |
1038 | printk(KERN_ERR | 1039 | printk(KERN_ERR |
@@ -1573,9 +1574,9 @@ static int vidioc_queryctrl(struct file *file, void *priv, | |||
1573 | return cx23885_queryctrl(dev, c); | 1574 | return cx23885_queryctrl(dev, c); |
1574 | } | 1575 | } |
1575 | 1576 | ||
1576 | static int mpeg_open(struct inode *inode, struct file *file) | 1577 | static int mpeg_open(struct file *file) |
1577 | { | 1578 | { |
1578 | int minor = iminor(inode); | 1579 | int minor = video_devdata(file)->minor; |
1579 | struct cx23885_dev *h, *dev = NULL; | 1580 | struct cx23885_dev *h, *dev = NULL; |
1580 | struct list_head *list; | 1581 | struct list_head *list; |
1581 | struct cx23885_fh *fh; | 1582 | struct cx23885_fh *fh; |
@@ -1617,7 +1618,7 @@ static int mpeg_open(struct inode *inode, struct file *file) | |||
1617 | return 0; | 1618 | return 0; |
1618 | } | 1619 | } |
1619 | 1620 | ||
1620 | static int mpeg_release(struct inode *inode, struct file *file) | 1621 | static int mpeg_release(struct file *file) |
1621 | { | 1622 | { |
1622 | struct cx23885_fh *fh = file->private_data; | 1623 | struct cx23885_fh *fh = file->private_data; |
1623 | struct cx23885_dev *dev = fh->dev; | 1624 | struct cx23885_dev *dev = fh->dev; |
@@ -1694,15 +1695,13 @@ static int mpeg_mmap(struct file *file, struct vm_area_struct *vma) | |||
1694 | return videobuf_mmap_mapper(&fh->mpegq, vma); | 1695 | return videobuf_mmap_mapper(&fh->mpegq, vma); |
1695 | } | 1696 | } |
1696 | 1697 | ||
1697 | static struct file_operations mpeg_fops = { | 1698 | static struct v4l2_file_operations mpeg_fops = { |
1698 | .owner = THIS_MODULE, | 1699 | .owner = THIS_MODULE, |
1699 | .open = mpeg_open, | 1700 | .open = mpeg_open, |
1700 | .release = mpeg_release, | 1701 | .release = mpeg_release, |
1701 | .read = mpeg_read, | 1702 | .read = mpeg_read, |
1702 | .poll = mpeg_poll, | 1703 | .poll = mpeg_poll, |
1703 | .mmap = mpeg_mmap, | 1704 | .mmap = mpeg_mmap, |
1704 | .ioctl = video_ioctl2, | ||
1705 | .llseek = no_llseek, | ||
1706 | }; | 1705 | }; |
1707 | 1706 | ||
1708 | static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { | 1707 | static const struct v4l2_ioctl_ops mpeg_ioctl_ops = { |