From patchwork Wed Aug 22 21:00:19 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sylwester Nawrocki X-Patchwork-Id: 1363331 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id C27D9DF280 for ; Wed, 22 Aug 2012 21:00:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933321Ab2HVVAk (ORCPT ); Wed, 22 Aug 2012 17:00:40 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:53295 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933298Ab2HVVAj (ORCPT ); Wed, 22 Aug 2012 17:00:39 -0400 Received: by weyx8 with SMTP id x8so18483wey.19 for ; Wed, 22 Aug 2012 14:00:38 -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:x-mailer; bh=t7soznOhmvKq+hOSKVNZFpEVKwJJws6MRmnV3zPLPeY=; b=KOz2bRdkHPwt4BQ3h5Q5KA6aeCPKF8HCKIOvBqspndVNB2qrpW/NAwOb1F7MS/xJoW 0e8tNk0sLqVF+IEU+Yw31Cl6uqJP777t4zcLOswuIR3f9dC/ZXLC36E/p4KCqagMUw3Y Uwnh6Yo6aovOcYN6titoGM96xp9f4QmpLgIghAGXzgZ0K8ES8VyyqgIkrQmJMml21Qf8 vZtE6ZiHQKUO9/63YtgSI/+OUdw5GUIXQINiuSan4k4cyjyzLCnl704IHuBtUJM4y1e3 mEVFM0skEeAbJG3dUUC+tdB+pDOcvMkyMtLQ4HcOqDNKz/NJOKj3Zol+d485fxWvuThP WN9A== Received: by 10.180.85.167 with SMTP id i7mr8841058wiz.8.1345669237873; Wed, 22 Aug 2012 14:00:37 -0700 (PDT) Received: from localhost.localdomain (031011252076.warszawa.vectranet.pl. [31.11.252.76]) by mx.google.com with ESMTPS id fb20sm15346327wid.1.2012.08.22.14.00.36 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Aug 2012 14:00:37 -0700 (PDT) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: Sylwester Nawrocki , Javier Martin Subject: [PATCH] coda: Add V4L2_CAP_VIDEO_M2M capability flag Date: Wed, 22 Aug 2012 23:00:19 +0200 Message-Id: <1345669220-21052-1-git-send-email-sylvester.nawrocki@gmail.com> X-Mailer: git-send-email 1.7.4.1 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org New mem-to-mem video drivers should use V4L2_CAP_VIDEO_M2M capability, rather than ORed V4L2_CAP_VIDEO_CAPTURE and V4L2_CAP_VIDEO_OUTPUT flags, as outlined in commit a1367f1b260d29e9b9fb20d8e2f39f1e74fa6c3b. Cc: Javier Martin Signed-off-by: Sylwester Nawrocki Acked-by: Javier Martin --- drivers/media/platform/coda.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 0d6e0a0..e74705c 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -287,8 +287,13 @@ static int vidioc_querycap(struct file *file, void *priv, strlcpy(cap->driver, CODA_NAME, sizeof(cap->driver)); strlcpy(cap->card, CODA_NAME, sizeof(cap->card)); strlcpy(cap->bus_info, CODA_NAME, sizeof(cap->bus_info)); - cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT - | V4L2_CAP_STREAMING; + /* + * This is only a mem-to-mem video device. The capture and output + * device capability flags are left only for backward compatibility + * and are scheduled for removal. + */ + cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT | + V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS; return 0;