diff options
-rw-r--r-- | drivers/media/platform/soc_camera/soc_camera.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/media/platform/soc_camera/soc_camera.c b/drivers/media/platform/soc_camera/soc_camera.c index 6f76ada1b2d8..4e3735679f17 100644 --- a/drivers/media/platform/soc_camera/soc_camera.c +++ b/drivers/media/platform/soc_camera/soc_camera.c | |||
@@ -645,11 +645,17 @@ static ssize_t soc_camera_read(struct file *file, char __user *buf, | |||
645 | size_t count, loff_t *ppos) | 645 | size_t count, loff_t *ppos) |
646 | { | 646 | { |
647 | struct soc_camera_device *icd = file->private_data; | 647 | struct soc_camera_device *icd = file->private_data; |
648 | int err = -EINVAL; | 648 | struct soc_camera_host *ici = to_soc_camera_host(icd->parent); |
649 | |||
650 | dev_dbg(icd->pdev, "read called, buf %p\n", buf); | ||
651 | |||
652 | if (ici->ops->init_videobuf2 && icd->vb2_vidq.io_modes & VB2_READ) | ||
653 | return vb2_read(&icd->vb2_vidq, buf, count, ppos, | ||
654 | file->f_flags & O_NONBLOCK); | ||
649 | 655 | ||
650 | dev_err(icd->pdev, "camera device read not implemented\n"); | 656 | dev_err(icd->pdev, "camera device read not implemented\n"); |
651 | 657 | ||
652 | return err; | 658 | return -EINVAL; |
653 | } | 659 | } |
654 | 660 | ||
655 | static int soc_camera_mmap(struct file *file, struct vm_area_struct *vma) | 661 | static int soc_camera_mmap(struct file *file, struct vm_area_struct *vma) |