On Fri June 7 2013 11:41:30 Hans Verkuil wrote:
> On Fri June 7 2013 11:33:16 Guennadi Liakhovetski wrote:
> > On Mon, 3 Jun 2013, Hans Verkuil wrote:
> > 
> > > From: Hans Verkuil <hans.verk...@cisco.com>
> > > 
> > > The parent field will eventually disappear to be replaced by v4l2_dev.
> > > soc_camera does provide a v4l2_device struct but did not point to it in
> > > struct video_device. This is now fixed.
> > > 
> > > Signed-off-by: Hans Verkuil <hans.verk...@cisco.com>
> > > Cc: Guennadi Liakhovetski <g.liakhovet...@gmx.de>
> > > ---
> > >  drivers/media/platform/soc_camera/soc_camera.c |    4 ++--
> > >  1 file changed, 2 insertions(+), 2 deletions(-)
> > > 
> > > diff --git a/drivers/media/platform/soc_camera/soc_camera.c 
> > > b/drivers/media/platform/soc_camera/soc_camera.c
> > > index 96645e9..ea951ec 100644
> > > --- a/drivers/media/platform/soc_camera/soc_camera.c
> > > +++ b/drivers/media/platform/soc_camera/soc_camera.c
> > > @@ -524,7 +524,7 @@ static int soc_camera_open(struct file *file)
> > >           return -ENODEV;
> > >   }
> > >  
> > > - icd = dev_get_drvdata(vdev->parent);
> > > + icd = dev_get_drvdata(vdev->v4l2_dev->dev);
> > >   ici = to_soc_camera_host(icd->parent);
> > >  
> > >   ret = try_module_get(ici->ops->owner) ? 0 : -ENODEV;
> > > @@ -1511,7 +1511,7 @@ static int video_dev_create(struct 
> > > soc_camera_device *icd)
> > >  
> > >   strlcpy(vdev->name, ici->drv_name, sizeof(vdev->name));
> > >  
> > > - vdev->parent            = icd->pdev;
> > > + vdev->v4l2_dev          = &ici->v4l2_dev;
> > >   vdev->fops              = &soc_camera_fops;
> > >   vdev->ioctl_ops         = &soc_camera_ioctl_ops;
> > >   vdev->release           = video_device_release;
> > 
> > Doesn't it break soc-camera?... I think those are 2 absolutely different 
> > devices, so, you're not getting icd from 
> > dev_get_drvdata(vdev->v4l2_dev->dev).
> 
> I'm looking into this today. I managed to get my renesas board up and running
> again yesterday, so I have a decent soc-camera test environment.
> 
> This was the one patch that I wasn't sure about, so it definitely needs more
> analysis. I'll remove it from the patch series anyway, since it is unrelated
> to the current_norm changes.

Yes, it breaks soc_camera. I have a proper fix for this, but I'm postponing
this.

Stupid question perhaps, but why is soc_camera_device a platform_device?
It's weird. The camera host device is definitely a platform_device, and
the video nodes are childs of that platform_device, but soc_camera_device
doesn't map to any hardware.

Regards,

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

Reply via email to