From patchwork Wed Sep 7 10:39:04 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hans Verkuil X-Patchwork-Id: 9318885 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id BF6B66077F for ; Wed, 7 Sep 2016 10:39:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AA15A29224 for ; Wed, 7 Sep 2016 10:39:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9F21929228; Wed, 7 Sep 2016 10:39:22 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34AD329224 for ; Wed, 7 Sep 2016 10:39:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757394AbcIGKjO (ORCPT ); Wed, 7 Sep 2016 06:39:14 -0400 Received: from lb2-smtp-cloud2.xs4all.net ([194.109.24.25]:38501 "EHLO lb2-smtp-cloud2.xs4all.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757385AbcIGKjL (ORCPT ); Wed, 7 Sep 2016 06:39:11 -0400 Received: from tschai.lan ([90.149.38.145]) by smtp-cloud2.xs4all.net with ESMTP id gaf61t00637uBN201af9SN; Wed, 07 Sep 2016 12:39:09 +0200 Received: from [10.47.79.81] (unknown [173.38.220.42]) by tschai.lan (Postfix) with ESMTPSA id E0BA218597A for ; Wed, 7 Sep 2016 12:39:05 +0200 (CEST) To: linux-media@vger.kernel.org From: Hans Verkuil Subject: [PATCH] v4l-drivers/fourcc.rst: fix typo Message-ID: <23edb640-5a92-2eff-23a5-ce88bab7e2d7@xs4all.nl> Date: Wed, 7 Sep 2016 12:39:04 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2.0 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Linux4Linux -> Video4Linux Signed-off-by: Hans Verkuil --- if (b->bytesused > length) -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/media/v4l-drivers/fourcc.rst b/Documentation/media/v4l-drivers/fourcc.rst index f7c8cef..9c82106 100644 --- a/Documentation/media/v4l-drivers/fourcc.rst +++ b/Documentation/media/v4l-drivers/fourcc.rst @@ -1,4 +1,4 @@ -Guidelines for Linux4Linux pixel format 4CCs +Guidelines for Video4Linux pixel format 4CCs ============================================ Guidelines for Video4Linux 4CC codes defined using v4l2_fourcc() are diff --git a/drivers/media/v4l2-core/videobuf2-v4l2.c b/drivers/media/v4l2-core/videobuf2-v4l2.c index 9cfbb6e..f21cce1 100644 --- a/drivers/media/v4l2-core/videobuf2-v4l2.c +++ b/drivers/media/v4l2-core/videobuf2-v4l2.c @@ -109,7 +109,8 @@ static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b) return -EINVAL; } } else { - length = (b->memory == VB2_MEMORY_USERPTR) + length = (b->memory == VB2_MEMORY_USERPTR || + b->memory == VB2_MEMORY_DMABUF) ? b->length : vb->planes[0].length;