Re: [PATCH v2] V4L: soc_camera: allow reading from video device if supported

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Guennadi,

On Fri, 24 Aug 2012 13:37:20 +0200 (CEST)
Guennadi Liakhovetski <g.liakhovetski@xxxxxx> wrote:
...
> How about a slightly simpler
> 
> > +	struct soc_camera_host *ici = to_soc_camera_host(icd->parent);
> > -	int err = -EINVAL;
> >  
> > -	dev_err(icd->pdev, "camera device read not implemented\n");
> > +	dev_dbg(icd->pdev, "read called, buf %p\n", buf);
> >  
> > -	return err;
> > +	if (ici->ops->init_videobuf2 && icd->vb2_vidq.io_modes & VB2_READ)
> > +		return vb2_read(&icd->vb2_vidq, buf, count, ppos,
> > +				file->f_flags & O_NONBLOCK);
> > +
> > +	dev_err(icd->pdev, "camera device read not implemented\n");
> > +	return -EINVAL;

Ok, I'll simplify as suggested and resubmit.

Thanks,

Anatolij
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux