From patchwork Sat Jul 26 14:34:31 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philipp Zabel X-Patchwork-Id: 4627151 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id F0455C0338 for ; Sat, 26 Jul 2014 14:34:46 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3A17F2015A for ; Sat, 26 Jul 2014 14:34:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 70F4D20158 for ; Sat, 26 Jul 2014 14:34:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751497AbaGZOem (ORCPT ); Sat, 26 Jul 2014 10:34:42 -0400 Received: from mail-wi0-f181.google.com ([209.85.212.181]:43884 "EHLO mail-wi0-f181.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750810AbaGZOel (ORCPT ); Sat, 26 Jul 2014 10:34:41 -0400 Received: by mail-wi0-f181.google.com with SMTP id bs8so2327299wib.2 for ; Sat, 26 Jul 2014 07:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=DI3eOPCeCmAAVZuC3PxQDK/RPWdMKPjtTatJc4wttns=; b=kI0Xz1RhiWprZwmnaT8o3EIGZVzh6ZhycPc8PMetryVjdoK1CEILet3b9aKeu/RtyL KKueBPjvgu/VD4G7Eg0vVY7Xmucqt9Nu8lGahtNPmdM+2Q55WTafQSRvLAXd15v0KfHg 0Zd4QcR903HhDPByOwJ5jwWJ0dA3dVsQE+CDLW0Nk3FuCNA5I/xz1f7D9MnlSBpBCIE7 kgZFTgAFz/NXDIuV97vsulITISU1l6NWXnQJ8tsycHJ7ZUD7zGLMLUObXZqEoR0niCFa GJFIw/tMe2IuCcHnHp9f+imRYud8+ySMzE0sQsM4CExsVbJOaJg7jqwLZqbeqkspVJ/e 3qQQ== X-Received: by 10.180.74.107 with SMTP id s11mr13873756wiv.68.1406385280548; Sat, 26 Jul 2014 07:34:40 -0700 (PDT) Received: from flow.hitronhub.home ([2a02:8108:8840:128c:222:15ff:fe78:43c2]) by mx.google.com with ESMTPSA id go4sm34051326wjc.39.2014.07.26.07.34.39 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sat, 26 Jul 2014 07:34:39 -0700 (PDT) From: Philipp Zabel To: linux-media@vger.kernel.org Cc: Mauro Carvalho Chehab , Kamil Debski , Hans Verkuil , Nicolas Dufresne , kernel@pengutronix.de, Philipp Zabel Subject: [PATCH 2/3] [media] coda: fix coda_g_selection Date: Sat, 26 Jul 2014 16:34:31 +0200 Message-Id: <1406385272-425-2-git-send-email-philipp.zabel@gmail.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1406385272-425-1-git-send-email-philipp.zabel@gmail.com> References: <1406385272-425-1-git-send-email-philipp.zabel@gmail.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Crop targets are valid on the capture side and compose targets are valid on the output side, not the other way around. Signed-off-by: Philipp Zabel --- drivers/media/platform/coda/coda-common.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/coda/coda-common.c b/drivers/media/platform/coda/coda-common.c index 95d0b04..b542340 100644 --- a/drivers/media/platform/coda/coda-common.c +++ b/drivers/media/platform/coda/coda-common.c @@ -600,7 +600,7 @@ static int coda_g_selection(struct file *file, void *fh, rsel = &r; /* fallthrough */ case V4L2_SEL_TGT_CROP: - if (s->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) + if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) return -EINVAL; break; case V4L2_SEL_TGT_COMPOSE_BOUNDS: @@ -609,7 +609,7 @@ static int coda_g_selection(struct file *file, void *fh, /* fallthrough */ case V4L2_SEL_TGT_COMPOSE: case V4L2_SEL_TGT_COMPOSE_DEFAULT: - if (s->type != V4L2_BUF_TYPE_VIDEO_CAPTURE) + if (s->type != V4L2_BUF_TYPE_VIDEO_OUTPUT) return -EINVAL; break; default: