From patchwork Wed Mar 17 14:29:50 2010
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Patchwork-Submitter: Pawel Osciak
X-Patchwork-Id: 86345
Received: from vger.kernel.org (vger.kernel.org [209.132.180.67])
by demeter.kernel.org (8.14.3/8.14.3) with ESMTP id o2HETxBY014138
for ;
Wed, 17 Mar 2010 14:29:59 GMT
Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand
id S1753913Ab0CQO36 (ORCPT
);
Wed, 17 Mar 2010 10:29:58 -0400
Received: from mailout2.w1.samsung.com ([210.118.77.12]:16693 "EHLO
mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org
with ESMTP id S1751942Ab0CQO36 (ORCPT
);
Wed, 17 Mar 2010 10:29:58 -0400
Received: from eu_spt2 (mailout2.w1.samsung.com [210.118.77.12])
by mailout2.w1.samsung.com
(iPlanet Messaging Server 5.2 Patch 2 (built Jul 14 2004))
with ESMTP id <0KZF00KFIK9VXA@mailout2.w1.samsung.com> for
linux-media@vger.kernel.org; Wed, 17 Mar 2010 14:29:55 +0000 (GMT)
Received: from linux.samsung.com ([106.116.38.10])
by spt2.w1.samsung.com (iPlanet Messaging Server 5.2 Patch 2 (built
Jul 14
2004)) with ESMTPA id <0KZF00HPKK9VAP@spt2.w1.samsung.com> for
linux-media@vger.kernel.org; Wed, 17 Mar 2010 14:29:55 +0000 (GMT)
Received: from localhost.localdomain (unknown [106.116.37.23])
by linux.samsung.com (Postfix) with ESMTP id 181D027004C; Wed,
17 Mar 2010 14:58:11 +0100 (CET)
Date: Wed, 17 Mar 2010 15:29:50 +0100
From: Pawel Osciak
Subject: [PATCH 2/2] v4l: videobuf: Add support for V4L2_BUF_FLAG_ERROR
In-reply-to: <1268836190-31051-1-git-send-email-p.osciak@samsung.com>
To: linux-media@vger.kernel.org
Cc: p.osciak@samsung.com, m.szyprowski@samsung.com, kyungmin.park@samsung.com
Message-id: <1268836190-31051-3-git-send-email-p.osciak@samsung.com>
MIME-version: 1.0
X-Mailer: git-send-email 1.7.0
Content-type: TEXT/PLAIN
Content-transfer-encoding: 7BIT
References: <1268836190-31051-1-git-send-email-p.osciak@samsung.com>
Sender: linux-media-owner@vger.kernel.org
Precedence: bulk
List-ID:
X-Mailing-List: linux-media@vger.kernel.org
X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by
milter-greylist-4.2.3 (demeter.kernel.org [140.211.167.41]);
Wed, 17 Mar 2010 14:29:59 +0000 (UTC)
diff --git a/drivers/media/video/videobuf-core.c b/drivers/media/video/videobuf-core.c
index e93672a..aa361d3 100644
--- a/drivers/media/video/videobuf-core.c
+++ b/drivers/media/video/videobuf-core.c
@@ -286,8 +286,10 @@ static void videobuf_status(struct videobuf_queue *q, struct v4l2_buffer *b,
case VIDEOBUF_ACTIVE:
b->flags |= V4L2_BUF_FLAG_QUEUED;
break;
- case VIDEOBUF_DONE:
case VIDEOBUF_ERROR:
+ b->flags |= V4L2_BUF_FLAG_ERROR;
+ /* fall through */
+ case VIDEOBUF_DONE:
b->flags |= V4L2_BUF_FLAG_DONE;
break;
case VIDEOBUF_NEEDS_INIT:
@@ -679,7 +681,6 @@ int videobuf_dqbuf(struct videobuf_queue *q,
switch (buf->state) {
case VIDEOBUF_ERROR:
dprintk(1, "dqbuf: state is error\n");
- retval = -EIO;
CALL(q, sync, q, buf);
buf->state = VIDEOBUF_IDLE;
break;