Re: [RFCv1 PATCH 8/9] vivi: add support for CTRL_CH_STATE events.

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

 



Hi Hans,

Thanks for the patch.

On Monday 04 April 2011 13:51:53 Hans Verkuil wrote:
> Signed-off-by: Hans Verkuil <hans.verkuil@xxxxxxxxx>
> ---
>  drivers/media/video/v4l2-event.c |    6 ++++--
>  drivers/media/video/vivi.c       |    8 ++++++--
>  2 files changed, 10 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/media/video/v4l2-event.c
> b/drivers/media/video/v4l2-event.c index c9251a5..9b503aa 100644
> --- a/drivers/media/video/v4l2-event.c
> +++ b/drivers/media/video/v4l2-event.c
> @@ -258,7 +258,8 @@ int v4l2_event_subscribe(struct v4l2_fh *fh,
>  		return -ENOMEM;
>  	}
> 
> -	if (sub->type == V4L2_EVENT_CTRL_CH_VALUE) {
> +	if (sub->type == V4L2_EVENT_CTRL_CH_VALUE ||
> +			sub->type == V4L2_EVENT_CTRL_CH_STATE) {

Indentation looks weird here.

>  		ctrl = v4l2_ctrl_find(fh->ctrl_handler, sub->id);
>  		if (ctrl == NULL)
>  			return -EINVAL;
> @@ -341,7 +342,8 @@ int v4l2_event_unsubscribe(struct v4l2_fh *fh,
>  		list_del(&sev->list);
> 
>  	spin_unlock_irqrestore(&fh->vdev->fh_lock, flags);
> -	if (sev->type == V4L2_EVENT_CTRL_CH_VALUE) {
> +	if (sev->type == V4L2_EVENT_CTRL_CH_VALUE ||
> +			sev->type == V4L2_EVENT_CTRL_CH_STATE) {

And here.

>  		struct v4l2_ctrl *ctrl = v4l2_ctrl_find(fh->ctrl_handler, sev->id);
> 
>  		if (ctrl)

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