All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Verkuil <hverkuil@xs4all.nl>
To: linux-media@vger.kernel.org
Subject: [PATCH 3/7] [RFC] v4l2-fh: implement v4l2_priority support.
Date: Sun, 09 May 2010 21:29:12 +0200	[thread overview]
Message-ID: <32e22cd465fb61e524a4906dfd77f58645ef3ff9.1273432986.git.hverkuil@xs4all.nl> (raw)
In-Reply-To: <cover.1273432986.git.hverkuil@xs4all.nl>

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
---
 drivers/media/video/v4l2-fh.c |    4 ++++
 include/media/v4l2-fh.h       |    1 +
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/media/video/v4l2-fh.c b/drivers/media/video/v4l2-fh.c
index d78f184..d57908a 100644
--- a/drivers/media/video/v4l2-fh.c
+++ b/drivers/media/video/v4l2-fh.c
@@ -27,12 +27,14 @@
 #include <media/v4l2-fh.h>
 #include <media/v4l2-event.h>
 #include <media/v4l2-ioctl.h>
+#include <media/v4l2-device.h>
 
 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;
 
 	/*
 	 * 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->v4l2_dev->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->v4l2_dev->prio, fh->prio);
 }
 EXPORT_SYMBOL_GPL(v4l2_fh_del);
 
diff --git a/include/media/v4l2-fh.h b/include/media/v4l2-fh.h
index 1d72dde..ff513fe 100644
--- a/include/media/v4l2-fh.h
+++ b/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;
 };
 
 /*
-- 
1.6.4.2


  parent reply	other threads:[~2010-05-09 19:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-05-09 19:29 [PATCH 0/7] [RFC] Move VIDIOC_G/S_PRIORITY handling to the V4L core Hans Verkuil
2010-05-09 19:29 ` [PATCH 1/7] [RFC] v4l2_prio: move from v4l2-common to v4l2-device Hans Verkuil
2010-05-09 19:29 ` [PATCH 2/7] [RFC] v4l2-device: add v4l2_prio_state to v4l2_device Hans Verkuil
2010-05-09 19:29 ` Hans Verkuil [this message]
2010-05-09 19:29 ` [PATCH 4/7] [RFC] v4l2-dev: add and support flag V4L2_FH_USE_PRIO Hans Verkuil
2010-05-09 19:29 ` [PATCH 5/7] [RFC] v4l2-ioctl: add priority handling support Hans Verkuil
2010-05-09 19:29 ` [PATCH 6/7] [RFC] ivtv: drop priority handling, use core framework for this Hans Verkuil
2010-05-09 19:29 ` [PATCH 7/7] [RFC] ivtv: add priority checks for the non-standard commands Hans Verkuil
2010-05-10 10:54 ` [PATCH 0/7] [RFC] Move VIDIOC_G/S_PRIORITY handling to the V4L core Laurent Pinchart

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=32e22cd465fb61e524a4906dfd77f58645ef3ff9.1273432986.git.hverkuil@xs4all.nl \
    --to=hverkuil@xs4all.nl \
    --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.