Re: [RFC PATCH 05/13] soc_camera: replace vdev->parent by vdev->v4l2_dev.

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

 



On Fri June 7 2013 11:33:16 Guennadi Liakhovetski wrote:
> On Mon, 3 Jun 2013, Hans Verkuil wrote:
> 
> > From: Hans Verkuil <hans.verkuil@xxxxxxxxx>
> > 
> > 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.verkuil@xxxxxxxxx>
> > Cc: Guennadi Liakhovetski <g.liakhovetski@xxxxxx>
> > ---
> >  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.

Regards,

	Hans
--
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