public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: corbet@lwn.net (Jonathan Corbet)
To: linux-kernel@vger.kernel.org
Cc: akpm@osdl.org, mchehab@infradead.org, stable@kernel.org,
	s.hauer@pengutronix.de
Subject: [PATCH] v4l2 VIDIOC_DQBUF typo in 2.6.18
Date: Mon, 25 Sep 2006 06:58:20 -0600	[thread overview]
Message-ID: <8056.1159189100@lwn.net> (raw)


It seems that, in the rush to create the new V4L2 ioctl() API, the
VIDIOC_DQBUF code got cut-and-pasted in without being fixed up.  I went
and made a patch, only to discover that Sascha Hauer beat me to it.
That patch doesn't seem to have been picked up yet, however.  Since it's
important (streaming I/O will not work without it), here's an attempt to
spread it a bit more widely.

jon


From: Sascha Hauer <s.hauer@pengutronix.de>
Subject: [PATCH] copy-paste bug in videodev.c
Date: Mon, 11 Sep 2006 10:50:55 +0200
To: video4linux-list@redhat.com

This patch fixes a copy-paste bug in videodev.c where the vidioc_qbuf()
function gets called for the dqbuf ioctl.

Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>

diff --git a/drivers/media/video/videodev.c
b/drivers/media/video/videodev.c
index 88bf2af..8abee33 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -739,13 +739,13 @@ static int __video_do_ioctl(struct inode
 	case VIDIOC_DQBUF:
 	{
 		struct v4l2_buffer *p=arg;
-		if (!vfd->vidioc_qbuf)
+		if (!vfd->vidioc_dqbuf)
 			break;
 		ret = check_fmt (vfd, p->type);
 		if (ret)
 			break;
 
-		ret=vfd->vidioc_qbuf(file, fh, p);
+		ret=vfd->vidioc_dqbuf(file, fh, p);
 		if (!ret)
 			dbgbuf(cmd,vfd,p);
 		break;


-- 
 Dipl.-Ing. Sascha Hauer | http://www.pengutronix.de
  Pengutronix - Linux Solutions for Science and Industry
    Handelsregister: Amtsgericht Hildesheim, HRA 2686
      Hannoversche Str. 2, 31134 Hildesheim, Germany
    Phone: +49-5121-206917-0 |  Fax: +49-5121-206917-9

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list


--=-=-=--

             reply	other threads:[~2006-09-25 12:58 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-09-25 12:58 Jonathan Corbet [this message]
2006-09-25 13:24 ` [PATCH] v4l2 VIDIOC_DQBUF typo in 2.6.18 Mauro Carvalho Chehab

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=8056.1159189100@lwn.net \
    --to=corbet@lwn.net \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mchehab@infradead.org \
    --cc=s.hauer@pengutronix.de \
    --cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox