Re: [PATCH 4/8] V4L: Events: Support event handling in do_ioctl

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

 



On Sunday 07 February 2010 13:15:12 Sakari Ailus wrote:
> Sakari Ailus wrote:
> > Add support for event handling to do_ioctl.
> > 
> > Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxxxxxxxxxxxxx>
> ...
> > @@ -239,6 +241,13 @@ struct v4l2_ioctl_ops {
> >  	int (*vidioc_enum_frameintervals) (struct file *file, void *fh,
> >  					   struct v4l2_frmivalenum *fival);
> >  
> > +	int (*vidioc_dqevent)	       (struct v4l2_fh *fh,
> > +					struct v4l2_event *ev);
> > +	int (*vidioc_subscribe_event)  (struct v4l2_fh *fh,
> > +					struct v4l2_event_subscription *sub);
> > +	int (*vidioc_unsubscribe_event) (struct v4l2_fh *fh,
> > +					 struct v4l2_event_subscription *sub);
> > +
> >  	/* For other private ioctls */
> >  	long (*vidioc_default)	       (struct file *file, void *fh,
> >  					int cmd, void *arg);
> 
> Replying to myself, there seems to be valid use for the struct file as
> an argument to the function fields. That is a way to get the video
> device pointer using video_devdata(). Otherwise the video device pointer
> has to be stored in the file handle instead.
> 
> So I'm going to add the file pointers as first arguments here as they
> are in other functions unless there are objections. The type of second
> argument is still going to be struct v4l2_fh *.

No, instead v4l2_fh should have a pointer to video_device. Much cleaner and
consistent with the other v4l2 internal structures.

And see also my review I'm posting soon.

Regards,

	Hans

> 
> Regards,
> 
> 

-- 
Hans Verkuil - video4linux developer - sponsored by TANDBERG
--
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