From 2e1178d578b54dbd83097d45c8340206fcd38c2b Mon Sep 17 00:00:00 2001 From: Hans Verkuil Date: Wed, 29 Dec 2010 13:36:50 -0300 Subject: [PATCH] --- yaml --- r: 242117 b: refs/heads/master c: fc5602be7ca5b55174c5d6595089718779b28dfa h: refs/heads/master i: 242115: 15cce80df6c3de183fe831ab1609c66160561daf v: v3 --- [refs] | 2 +- trunk/drivers/media/video/v4l2-fh.c | 4 ++++ trunk/include/media/v4l2-fh.h | 1 + 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/[refs] b/[refs] index e7f83065dab4..78d975045b74 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 0f62fd6a2fa12d6a63cbb18f9e30b05345f636f6 +refs/heads/master: fc5602be7ca5b55174c5d6595089718779b28dfa diff --git a/trunk/drivers/media/video/v4l2-fh.c b/trunk/drivers/media/video/v4l2-fh.c index d78f184f40c5..78a1608a09d6 100644 --- a/trunk/drivers/media/video/v4l2-fh.c +++ b/trunk/drivers/media/video/v4l2-fh.c @@ -33,6 +33,8 @@ int v4l2_fh_init(struct v4l2_fh *fh, struct video_device *vdev) fh->vdev = vdev; INIT_LIST_HEAD(&fh->list); set_bit(V4L2_FL_USES_V4L2_FH, &fh->vdev->flags); + fh->prio = V4L2_PRIORITY_UNSET; + BUG_ON(vdev->prio == NULL); /* * fh->events only needs to be initialized if the driver @@ -51,6 +53,7 @@ void v4l2_fh_add(struct v4l2_fh *fh) { unsigned long flags; + v4l2_prio_open(fh->vdev->prio, &fh->prio); spin_lock_irqsave(&fh->vdev->fh_lock, flags); list_add(&fh->list, &fh->vdev->fh_list); spin_unlock_irqrestore(&fh->vdev->fh_lock, flags); @@ -64,6 +67,7 @@ void v4l2_fh_del(struct v4l2_fh *fh) spin_lock_irqsave(&fh->vdev->fh_lock, flags); list_del_init(&fh->list); spin_unlock_irqrestore(&fh->vdev->fh_lock, flags); + v4l2_prio_close(fh->vdev->prio, fh->prio); } EXPORT_SYMBOL_GPL(v4l2_fh_del); diff --git a/trunk/include/media/v4l2-fh.h b/trunk/include/media/v4l2-fh.h index 1d72dde320bf..5fc5ba96e1d2 100644 --- a/trunk/include/media/v4l2-fh.h +++ b/trunk/include/media/v4l2-fh.h @@ -35,6 +35,7 @@ struct v4l2_fh { struct list_head list; struct video_device *vdev; struct v4l2_events *events; /* events, pending and subscribed */ + enum v4l2_priority prio; }; /*