From patchwork Mon Aug 10 17:37:40 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Tuukka.O Toivonen" X-Patchwork-Id: 40448 Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by demeter.kernel.org (8.14.2/8.14.2) with ESMTP id n7AHbxlO006017 for ; Mon, 10 Aug 2009 17:38:00 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932338AbZHJRh5 (ORCPT ); Mon, 10 Aug 2009 13:37:57 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932344AbZHJRh4 (ORCPT ); Mon, 10 Aug 2009 13:37:56 -0400 Received: from smtp.nokia.com ([192.100.105.134]:21263 "EHLO mgw-mx09.nokia.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932338AbZHJRh4 (ORCPT ); Mon, 10 Aug 2009 13:37:56 -0400 Received: from esebh106.NOE.Nokia.com (esebh106.ntc.nokia.com [172.21.138.213]) by mgw-mx09.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n7AHbQSE023309; Mon, 10 Aug 2009 12:37:34 -0500 Received: from esebh102.NOE.Nokia.com ([172.21.138.183]) by esebh106.NOE.Nokia.com with Microsoft SMTPSVC(6.0.3790.3959); Mon, 10 Aug 2009 20:37:45 +0300 Received: from mgw-sa01.ext.nokia.com ([147.243.1.47]) by esebh102.NOE.Nokia.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.3959); Mon, 10 Aug 2009 20:37:44 +0300 Received: from ouped11921.nmp.nokia.com (ouped11921.nmp.nokia.com [172.23.119.21]) by mgw-sa01.ext.nokia.com (Switch-3.3.3/Switch-3.3.3) with ESMTP id n7AHbfSV005307; Mon, 10 Aug 2009 20:37:41 +0300 From: "Tuukka.O Toivonen" Organization: Nokia To: linux-media@vger.kernel.org Subject: [PATCH] V4L: videobuf-core.c VIDIOC_QBUF should return video buffer flags Date: Mon, 10 Aug 2009 20:37:40 +0300 User-Agent: KMail/1.9.10 Cc: sailus@maxwell.research.nokia.com, "Zutshi Vimarsh (Nokia-D/Helsinki)" , Lasse.Laukkanen@digia.com MIME-Version: 1.0 Content-Disposition: inline Message-Id: <200908102037.40140.tuukka.o.toivonen@nokia.com> X-OriginalArrivalTime: 10 Aug 2009 17:37:44.0597 (UTC) FILETIME=[44CAFC50:01CA19E1] X-Nokia-AV: Clean Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org When user space queues a buffer using VIDIOC_QBUF, the kernel should set flags to V4L2_BUF_FLAG_QUEUED in struct v4l2_buffer. videobuf_qbuf() was missing a call to videobuf_status() which does that. This patch adds the proper function call. Signed-off-by: Tuukka Toivonen --- drivers/media/video/videobuf-core.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c index b7b0584..d212710 100644 --- a/drivers/media/video/videobuf-core.c +++ b/drivers/media/video/videobuf-core.c @@ -565,6 +565,8 @@ int videobuf_qbuf(struct videobuf_queue *q, spin_unlock_irqrestore(q->irqlock, flags); } dprintk(1, "qbuf: succeded\n"); + memset(b, 0, sizeof(*b)); + videobuf_status(q, b, buf, q->type); retval = 0; wake_up_interruptible_sync(&q->wait);