diff options
Diffstat (limited to 'drivers/media/video/au0828/au0828-video.c')
-rw-r--r-- | drivers/media/video/au0828/au0828-video.c | 28 |
1 files changed, 24 insertions, 4 deletions
diff --git a/drivers/media/video/au0828/au0828-video.c b/drivers/media/video/au0828/au0828-video.c index e41e4ad5cc40..9c475c600fc9 100644 --- a/drivers/media/video/au0828/au0828-video.c +++ b/drivers/media/video/au0828/au0828-video.c | |||
@@ -1758,7 +1758,12 @@ static int vidioc_reqbufs(struct file *file, void *priv, | |||
1758 | if (rc < 0) | 1758 | if (rc < 0) |
1759 | return rc; | 1759 | return rc; |
1760 | 1760 | ||
1761 | return videobuf_reqbufs(&fh->vb_vidq, rb); | 1761 | if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) |
1762 | rc = videobuf_reqbufs(&fh->vb_vidq, rb); | ||
1763 | else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) | ||
1764 | rc = videobuf_reqbufs(&fh->vb_vbiq, rb); | ||
1765 | |||
1766 | return rc; | ||
1762 | } | 1767 | } |
1763 | 1768 | ||
1764 | static int vidioc_querybuf(struct file *file, void *priv, | 1769 | static int vidioc_querybuf(struct file *file, void *priv, |
@@ -1772,7 +1777,12 @@ static int vidioc_querybuf(struct file *file, void *priv, | |||
1772 | if (rc < 0) | 1777 | if (rc < 0) |
1773 | return rc; | 1778 | return rc; |
1774 | 1779 | ||
1775 | return videobuf_querybuf(&fh->vb_vidq, b); | 1780 | if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) |
1781 | rc = videobuf_querybuf(&fh->vb_vidq, b); | ||
1782 | else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) | ||
1783 | rc = videobuf_querybuf(&fh->vb_vbiq, b); | ||
1784 | |||
1785 | return rc; | ||
1776 | } | 1786 | } |
1777 | 1787 | ||
1778 | static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *b) | 1788 | static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *b) |
@@ -1785,7 +1795,12 @@ static int vidioc_qbuf(struct file *file, void *priv, struct v4l2_buffer *b) | |||
1785 | if (rc < 0) | 1795 | if (rc < 0) |
1786 | return rc; | 1796 | return rc; |
1787 | 1797 | ||
1788 | return videobuf_qbuf(&fh->vb_vidq, b); | 1798 | if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) |
1799 | rc = videobuf_qbuf(&fh->vb_vidq, b); | ||
1800 | else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) | ||
1801 | rc = videobuf_qbuf(&fh->vb_vbiq, b); | ||
1802 | |||
1803 | return rc; | ||
1789 | } | 1804 | } |
1790 | 1805 | ||
1791 | static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b) | 1806 | static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b) |
@@ -1806,7 +1821,12 @@ static int vidioc_dqbuf(struct file *file, void *priv, struct v4l2_buffer *b) | |||
1806 | dev->greenscreen_detected = 0; | 1821 | dev->greenscreen_detected = 0; |
1807 | } | 1822 | } |
1808 | 1823 | ||
1809 | return videobuf_dqbuf(&fh->vb_vidq, b, file->f_flags & O_NONBLOCK); | 1824 | if (fh->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) |
1825 | rc = videobuf_dqbuf(&fh->vb_vidq, b, file->f_flags & O_NONBLOCK); | ||
1826 | else if (fh->type == V4L2_BUF_TYPE_VBI_CAPTURE) | ||
1827 | rc = videobuf_dqbuf(&fh->vb_vbiq, b, file->f_flags & O_NONBLOCK); | ||
1828 | |||
1829 | return rc; | ||
1810 | } | 1830 | } |
1811 | 1831 | ||
1812 | static struct v4l2_file_operations au0828_v4l_fops = { | 1832 | static struct v4l2_file_operations au0828_v4l_fops = { |