Laurent Pinchart wrote: > Hi Sakari, Salut Laurent, >>> There is a crucial piece of functionality missing here: if the filehandle >>> is in blocking mode, then it should wait until an event arrives. That >>> also means that if vfh->events == NULL, you should still call >>> v4l2_event_dequeue, and that function should initialize vfh->events and >>> wait for an event if the fh is in blocking mode. >> >> I originally left this out intentionally. Most applications using events >> would use select / poll as well by default. For completeness it should >> be there, I agree. >> >> This btw. suggests that we perhaps should put back the struct file >> argument for the event functions in video_ioctl_ops. The blocking flag >> is indeed part of the file structure. I'm open to better suggestions, too. > > If the only information we need from struct file is the flags, they could be > copied to v4l2_fh in the open handler. We could also put a struct file * > member in v4l2_fh. That could be one possibility. Copying the flags in open() isn't enough as they can change as a result of fcntl call. As we're not handling that call the flags in struct v4l2_fh would have to be updated for every ioctl. I'm not a big fan of caching information in general either. :-) I could accept this, though. -- Sakari Ailus sakari.ailus@xxxxxxxxxxxxxxxxxxxxxxxxxx -- 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