Re: [RFCv1 PATCH 2/8] v4l2-ctrls/event: remove struct v4l2_ctrl_fh, instead use v4l2_subscribed_event

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

 



Hi Hans,

Thanks for the patch.

On Tuesday 14 June 2011 17:22:27 Hans Verkuil wrote:
> From: Hans Verkuil <hans.verkuil@xxxxxxxxx>
> 
> The v4l2_ctrl_fh struct connected v4l2_ctrl with v4l2_fh so the control
> would know which filehandles subscribed to it. However, it is much easier
> to use struct v4l2_subscribed_event directly for that and get rid of that
> intermediate struct.

[snip]

> diff --git a/include/media/v4l2-event.h b/include/media/v4l2-event.h
> index 042b893..eda17f8 100644
> --- a/include/media/v4l2-event.h
> +++ b/include/media/v4l2-event.h
> @@ -38,9 +38,18 @@ struct v4l2_kevent {
>  };
> 
>  struct v4l2_subscribed_event {
> +	/* list node for the v4l2_fh->subscribed list */
>  	struct list_head	list;
> +	/* event type */
>  	u32			type;
> +	/* associated object ID (e.g. control ID) */
>  	u32			id;
> +	/* copy of v4l2_event_subscription->flags */
> +	u32			flags;
> +	/* filehandle that subscribed to this event */
> +	struct v4l2_fh		*fh;
> +	/* list node that hooks into the object's event list (if there is one) */
> +	struct list_head	node;
>  };
> 
>  int v4l2_event_alloc(struct v4l2_fh *fh, unsigned int n);

What about using kerneldoc style and document the structure in a single 
comment block right above it ? I find it easier to read.

-- 
Regards,

Laurent Pinchart
--
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