From patchwork Wed Aug 22 21:00:20 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sylwester Nawrocki X-Patchwork-Id: 1363341 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 151A4DF280 for ; Wed, 22 Aug 2012 21:00:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933323Ab2HVVAm (ORCPT ); Wed, 22 Aug 2012 17:00:42 -0400 Received: from mail-we0-f174.google.com ([74.125.82.174]:47392 "EHLO mail-we0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933315Ab2HVVAk (ORCPT ); Wed, 22 Aug 2012 17:00:40 -0400 Received: by weyx8 with SMTP id x8so18499wey.19 for ; Wed, 22 Aug 2012 14:00:39 -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:in-reply-to:references; bh=HTlpKLYppLLXhfLwuac9scOnX1eeGZZNuzDdxaJmm4I=; b=oogI+uXN3flljDgdVwzMs6vTmmtZqiTwfHI/RwXyEIdhtrCb8dLUpxS1c5AMR7M3Ji U657w79DhiwRiXnHjGEf+WpxXwuIYw+6o/7RpKgWhogseupo82g9MRx98jwYt7fsdfQh +29X1neLxZeZ+Fqo6AOTe+J/g6cXapBn8c8lfvWJDFFiemAOvqrGbmsMP/K7uRbBd0Ax TnZzBcz5+PJCSxr82wo8W8l1ouUo+ChcifGO9Mo5E97BMzQzA0dgTYEwEcsQQjXoonly 27YauXfgjZhJk8OFig4lYhnNWo9qo3N1DcbboBmbhhD2jHAAiUG6OyqwtZK6M/a3Oy3a 8qBw== Received: by 10.180.109.166 with SMTP id ht6mr8825063wib.11.1345669239217; Wed, 22 Aug 2012 14:00:39 -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.37 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 22 Aug 2012 14:00:38 -0700 (PDT) From: Sylwester Nawrocki To: linux-media@vger.kernel.org Cc: Sylwester Nawrocki , Javier Martin Subject: [PATCH] m2m-deinterlace: Add V4L2_CAP_VIDEO_M2M capability flag Date: Wed, 22 Aug 2012 23:00:20 +0200 Message-Id: <1345669220-21052-2-git-send-email-sylvester.nawrocki@gmail.com> X-Mailer: git-send-email 1.7.4.1 In-Reply-To: <1345669220-21052-1-git-send-email-sylvester.nawrocki@gmail.com> References: <1345669220-21052-1-git-send-email-sylvester.nawrocki@gmail.com> 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/m2m-deinterlace.c | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/m2m-deinterlace.c b/drivers/media/platform/m2m-deinterlace.c index a38c152..5c7df67 100644 --- a/drivers/media/platform/m2m-deinterlace.c +++ b/drivers/media/platform/m2m-deinterlace.c @@ -456,8 +456,13 @@ static int vidioc_querycap(struct file *file, void *priv, strlcpy(cap->driver, MEM2MEM_NAME, sizeof(cap->driver)); strlcpy(cap->card, MEM2MEM_NAME, sizeof(cap->card)); strlcpy(cap->bus_info, MEM2MEM_NAME, sizeof(cap->card)); - 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;