Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/sys/dev/video.c,v rcsdiff: /ftp/cvs/cvsroot/src/sys/dev/video.c,v: warning: Unknown phrases like `commitid ...;' are present. retrieving revision 1.17.6.3 retrieving revision 1.18 diff -u -p -r1.17.6.3 -r1.18 --- src/sys/dev/video.c 2009/04/28 07:35:13 1.17.6.3 +++ src/sys/dev/video.c 2008/12/23 03:22:29 1.18 @@ -1,4 +1,4 @@ -/* $NetBSD: video.c,v 1.17.6.3 2009/04/28 07:35:13 skrll Exp $ */ +/* $NetBSD: video.c,v 1.18 2008/12/23 03:22:29 jmorse Exp $ */ /* * Copyright (c) 2008 Patrick Mahoney @@ -36,7 +36,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: video.c,v 1.17.6.3 2009/04/28 07:35:13 skrll Exp $"); +__KERNEL_RCSID(0, "$NetBSD: video.c,v 1.18 2008/12/23 03:22:29 jmorse Exp $"); #include "video.h" #if NVIDEO > 0 @@ -760,7 +760,7 @@ video_set_format(struct video_softc *sc, int err; hw = sc->hw_if; - if (hw->set_format == NULL) + if (hw->get_format == NULL) return ENOTTY; v4l2_format_to_video_format(fmt, &vfmt); @@ -970,10 +970,6 @@ video_dequeue_buf(struct video_softc *sc } else { /* Block until we have sample */ while ((vb = video_stream_dequeue(vs)) == NULL) { - if (!vs->vs_streaming) { - mutex_exit(&vs->vs_lock); - return EINVAL; - } err = cv_wait_sig(&vs->vs_sample_cv, &vs->vs_lock); if (err != 0) { @@ -1568,12 +1564,10 @@ videopoll(dev_t dev, int events, struct return POLLERR; } - mutex_enter(&vs->vs_lock); if (!SIMPLEQ_EMPTY(&sc->sc_stream_in.vs_egress)) revents |= events & (POLLIN | POLLRDNORM); else selrecord(l, &vs->vs_sel); - mutex_exit(&vs->vs_lock); return (revents); } @@ -1650,7 +1644,7 @@ video_stream_setup_bufs(struct video_str /* Ensure that all allocated buffers are queued and not under * userspace control. */ for (i = 0; i < vs->vs_nbufs; ++i) { - if (!(vs->vs_buf[i]->vb_buf->flags & V4L2_BUF_FLAG_QUEUED)) { + if (!(vs->vs_buf[i]->vb_buf->flags | V4L2_BUF_FLAG_QUEUED)) { mutex_exit(&vs->vs_lock); return EBUSY; }