Hi Hans,
On Monday 14 February 2011 13:45:23 Hans Verkuil wrote:
[snip]
> > +int v4l2_device_register_subdev_nodes(struct v4l2_device *v4l2_dev)
> > +{
> > + struct video_device *vdev;
> > + struct v4l2_subdev *sd;
> > + int err;
> > +
> > + /* Register a device node for every subdev marked with the
> > + * V4L2_SUBDEV_FL_HAS_DEVNODE flag.
> > + */
> > + list_for_each_entry(sd, &v4l2_dev->subdevs, list) {
> > + if (!(sd->flags & V4L2_SUBDEV_FL_HAS_DEVNODE))
> > + continue;
> > +
> > + vdev = &sd->devnode;
> > + strlcpy(vdev->name, sd->name, sizeof(vdev->name));
> > + vdev->parent = v4l2_dev->dev;
>
> Use this instead:
>
> vdev->v4l2_dev = v4l2_dev;
>
> Once all drivers use v4l2_device I intend to remove the parent field. So
> it is better to start using v4l2_dev right from the beginning.
Good point. I'll fix it.
> > + vdev->fops = &v4l2_subdev_fops;
> > + vdev->release = video_device_release_empty;
> > + err = __video_register_device(vdev, VFL_TYPE_SUBDEV, -1, 1,
> > + sd->owner);
> > + if (err < 0)
> > + return err;
> > + }
> > +
> > + return 0;
> > +}
> > +EXPORT_SYMBOL_GPL(v4l2_device_register_subdev_nodes);
>
> Once this is modified you can add my ack for this patch series since the
> other 5 patches are fine.
>
> Acked-by: Hans Verkuil <[email protected]>
Thanks.
--
Regards,
Laurent Pinchart
--
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