All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sakari Ailus <sakari.ailus@maxwell.research.nokia.com>
To: Hans Verkuil <hverkuil@xs4all.nl>
Cc: linux-media@vger.kernel.org, hans.verkuil@xs4all.nl,
	laurent.pinchart@ideasonboard.com, gururaj.nagendra@intel.com,
	david.cohen@nokia.com, iivanov@mm-sol.com
Subject: Re: [PATCH 4/8] V4L: Events: Support event handling in do_ioctl
Date: Sun, 07 Feb 2010 20:30:15 +0200	[thread overview]
Message-ID: <4B6F06B7.9000303@maxwell.research.nokia.com> (raw)
In-Reply-To: <201002071322.42556.hverkuil@xs4all.nl>

Hans Verkuil wrote:
> 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@maxwell.research.nokia.com>
>> ...
>>> @@ -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.

Right. Fixed that. There's now struct video_device pointer in struct
v4l2_fh.

-- 
Sakari Ailus
sakari.ailus@maxwell.research.nokia.com

  reply	other threads:[~2010-02-07 18:29 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-02-06 18:00 [PATCH 0/8] V4L2 file handles and event interface Sakari Ailus
2010-02-06 18:02 ` [PATCH 1/8] V4L: File handles Sakari Ailus
2010-02-06 18:02 ` [PATCH 2/8] V4L: File handles: Add refcount to v4l2_fh Sakari Ailus
2010-02-06 18:02 ` [PATCH 3/8] V4L: Events: Add new ioctls for events Sakari Ailus
2010-02-06 18:02 ` [PATCH 4/8] V4L: Events: Support event handling in do_ioctl Sakari Ailus
2010-02-07 12:15   ` Sakari Ailus
2010-02-07 12:22     ` Hans Verkuil
2010-02-07 18:30       ` Sakari Ailus [this message]
2010-02-06 18:02 ` [PATCH 5/8] V4L: Events: Add backend Sakari Ailus
2010-02-07 12:45   ` Hans Verkuil
2010-02-07 18:29     ` Sakari Ailus
2010-02-06 18:02 ` [PATCH 6/8] V4L: Events: Count event queue length Sakari Ailus
2010-02-06 18:02 ` [PATCH 7/8] V4L: Events: Sequence numbers Sakari Ailus
2010-02-06 18:02 ` [PATCH 8/8] V4L: Events: Support all events Sakari Ailus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B6F06B7.9000303@maxwell.research.nokia.com \
    --to=sakari.ailus@maxwell.research.nokia.com \
    --cc=david.cohen@nokia.com \
    --cc=gururaj.nagendra@intel.com \
    --cc=hans.verkuil@xs4all.nl \
    --cc=hverkuil@xs4all.nl \
    --cc=iivanov@mm-sol.com \
    --cc=laurent.pinchart@ideasonboard.com \
    --cc=linux-media@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.