From patchwork Fri Mar 9 17:49:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 10271481 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 6F6EE6016D for ; Fri, 9 Mar 2018 17:52:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5EE7129E37 for ; Fri, 9 Mar 2018 17:52:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5272129EAE; Fri, 9 Mar 2018 17:52:40 +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=unavailable 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 DD8E329EA1 for ; Fri, 9 Mar 2018 17:52:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932522AbeCIRtu (ORCPT ); Fri, 9 Mar 2018 12:49:50 -0500 Received: from mail-qt0-f193.google.com ([209.85.216.193]:37031 "EHLO mail-qt0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932342AbeCIRts (ORCPT ); Fri, 9 Mar 2018 12:49:48 -0500 Received: by mail-qt0-f193.google.com with SMTP id a23so267647qtm.4; Fri, 09 Mar 2018 09:49:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/BCKLruv+UkrZGFfoy0Choqfc/Tk+mhqC+CB//o75fY=; b=S5ypscOMO/E/w4IToXKkCAHKJ24r9YoDyuwURU4b00yXiJJlZfBm45yEnumGxkpphM 31RR20FVwl+jqSBVTS+7XFhz5haizcfZ4lYUO6ev01NMtrXs0OpV82NKSoyilYFj9Rgr fWgRVZtyPrmN+LyzwKFOGzKBFUbdFTvMrpvqxuIIBWabOpYGGJluA+ejMrfQalQRuLtq DEkrHD4IT5t8go7Nakg0xYQCp9y2Dx/O9Fc2Ln8CKq0dK8Qd9z3WjfapvinvZ3JBPumo rbwYaviELf0wDRE3TRXbLH+UJSItaiPOZNwLKwCuSdmiIQagPtoM7vs8IcCuWAaqor6X LhvQ== X-Gm-Message-State: AElRT7Gi33RFx0b8U2POxwLJdJPOFcx+gHw7x+D7C/8KwgRmwbNBAE82 OF4P4D7Ybnx4bYsgwpsFsgk9dba/ X-Google-Smtp-Source: AG47ELvfmAMMhpgnFDdf6ZAiZaTR3LDz2sOPSuJX5BrHV49ZsRzQ2NnZ9pPkaFrIuSjdzmyeM7/BRg== X-Received: by 10.200.35.46 with SMTP id a43mr49389467qta.311.1520617787884; Fri, 09 Mar 2018 09:49:47 -0800 (PST) Received: from localhost.localdomain ([2804:14c:138:2ada:4961:b672:c997:efad]) by smtp.gmail.com with ESMTPSA id g4sm873976qke.91.2018.03.09.09.49.44 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Mar 2018 09:49:47 -0800 (PST) From: Gustavo Padovan To: linux-media@vger.kernel.org Cc: kernel@collabora.com, Hans Verkuil , Mauro Carvalho Chehab , Shuah Khan , Pawel Osciak , Alexandre Courbot , Sakari Ailus , Brian Starkey , linux-kernel@vger.kernel.org, Gustavo Padovan Subject: [PATCH v8 03/13] [media] omap3isp: group device capabilities Date: Fri, 9 Mar 2018 14:49:10 -0300 Message-Id: <20180309174920.22373-4-gustavo@padovan.org> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180309174920.22373-1-gustavo@padovan.org> References: <20180309174920.22373-1-gustavo@padovan.org> 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 From: Gustavo Padovan Instead of putting V4L2_CAP_STREAMING everywhere, set device_caps earlier with this value. Signed-off-by: Gustavo Padovan --- drivers/media/platform/omap3isp/ispvideo.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/omap3isp/ispvideo.c b/drivers/media/platform/omap3isp/ispvideo.c index a751c89a3ea8..b4d4ef926749 100644 --- a/drivers/media/platform/omap3isp/ispvideo.c +++ b/drivers/media/platform/omap3isp/ispvideo.c @@ -658,13 +658,14 @@ isp_video_querycap(struct file *file, void *fh, struct v4l2_capability *cap) strlcpy(cap->card, video->video.name, sizeof(cap->card)); strlcpy(cap->bus_info, "media", sizeof(cap->bus_info)); - cap->capabilities = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT - | V4L2_CAP_STREAMING | V4L2_CAP_DEVICE_CAPS; + cap->device_caps = V4L2_CAP_STREAMING; + cap->capabilities = cap->device_caps | V4L2_CAP_VIDEO_CAPTURE | + V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_DEVICE_CAPS; if (video->type == V4L2_BUF_TYPE_VIDEO_CAPTURE) - cap->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_STREAMING; + cap->device_caps |= V4L2_CAP_VIDEO_CAPTURE; else - cap->device_caps = V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_STREAMING; + cap->device_caps |= V4L2_CAP_VIDEO_OUTPUT; return 0; }