[media] soc_camera: replace vdev->parent by vdev->v4l2_dev

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.
Now the video nodes can be found under the correct platform bus, and
the advanced debug ioctls work correctly as well (the core implementation
of those ioctls requires that v4l2_dev is set correctly).

Signed-off-by: Hans Verkuil <[email protected]>
Acked-by: Guennadi Liakhovetski <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
Hans Verkuil 2013-06-10 09:27:41 -03:00 • committed by Mauro Carvalho Chehab
commit 14381c2677
2 changed files with 5 additions and 4 deletions

View file

@ -346,9 +346,9 @@ static inline struct soc_camera_subdev_desc *soc_camera_i2c_to_desc(const struct
return client->dev.platform_data;
}
static inline struct v4l2_subdev *soc_camera_vdev_to_subdev(const struct video_device *vdev)
static inline struct v4l2_subdev *soc_camera_vdev_to_subdev(struct video_device *vdev)
{
struct soc_camera_device *icd = dev_get_drvdata(vdev->parent);
struct soc_camera_device *icd = video_get_drvdata(vdev);
return soc_camera_to_subdev(icd);
}