Hi Guennadi,

On Fri, 24 Aug 2012 13:37:20 +0200 (CEST)
Guennadi Liakhovetski <[email protected]> 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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to