All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] v4l2: v4l2-fh: v4l2_fh_is_singular should use list head to test
@ 2011-12-21 15:30 Scott Jiang
  2012-01-04 15:54 ` Sakari Ailus
  0 siblings, 1 reply; 5+ messages in thread
From: Scott Jiang @ 2011-12-21 15:30 UTC (permalink / raw)
  To: sakari.ailus, Hans Verkuil, Laurent Pinchart,
	Mauro Carvalho Chehab, linux-media, uclinux-dist-devel
  Cc: Scott Jiang

list_is_singular accepts a list head to test whether a list has just one entry.
fh->list is the entry, fh->vdev->fh_list is the list head.

Signed-off-by: Scott Jiang <scott.jiang.linux@gmail.com>
---
 drivers/media/video/v4l2-fh.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/v4l2-fh.c b/drivers/media/video/v4l2-fh.c
index 9e3fc04..8292c4a 100644
--- a/drivers/media/video/v4l2-fh.c
+++ b/drivers/media/video/v4l2-fh.c
@@ -113,7 +113,7 @@ int v4l2_fh_is_singular(struct v4l2_fh *fh)
 	if (fh == NULL || fh->vdev == NULL)
 		return 0;
 	spin_lock_irqsave(&fh->vdev->fh_lock, flags);
-	is_singular = list_is_singular(&fh->list);
+	is_singular = list_is_singular(&fh->vdev->fh_list);
 	spin_unlock_irqrestore(&fh->vdev->fh_lock, flags);
 	return is_singular;
 }
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-07 13:59 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-21 15:30 [PATCH] v4l2: v4l2-fh: v4l2_fh_is_singular should use list head to test Scott Jiang
2012-01-04 15:54 ` Sakari Ailus
2012-01-05  2:52   ` Scott Jiang
2012-01-05  7:57     ` Sakari Ailus
2012-01-07 13:59       ` Mauro Carvalho Chehab

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.