From patchwork Fri Mar 9 17:49:08 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Padovan X-Patchwork-Id: 10271487 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 57A456016D for ; Fri, 9 Mar 2018 17:53:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 451BB286F3 for ; Fri, 9 Mar 2018 17:53:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3988829EF2; Fri, 9 Mar 2018 17:53:04 +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 E3A25286F3 for ; Fri, 9 Mar 2018 17:53:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932458AbeCIRtm (ORCPT ); Fri, 9 Mar 2018 12:49:42 -0500 Received: from mail-qk0-f193.google.com ([209.85.220.193]:32967 "EHLO mail-qk0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932342AbeCIRtl (ORCPT ); Fri, 9 Mar 2018 12:49:41 -0500 Received: by mail-qk0-f193.google.com with SMTP id f25so4622685qkm.0; Fri, 09 Mar 2018 09:49:41 -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=vp7SYGa1/1N9UICDv17+a3ySdIoHCONfdhJtBNt5yKE=; b=guyOz+CiiRywk70L1zVxHDF9Xmw2ZQ6PqatCDSbjxCmoV3AbAg7lAoE7q+PvQACkZf Yy4MuWzWz/ntxkfcEB3qaGj2WSrCYB2P9GfnbQL0kc6BlQUN1rlL5s857fR2CQxERKBH 7QXQ3beIpyTddjsGyGIlto6bAMUkgLOQoHWYUafaa9Xf537HjP4q9TCIVyf0ScRiYjfr gcl/cj3V3CNY0KHwJ2BFDKlRd445Vqp0+bLaXXJVgzq0vLiXav60uCnQ7m9YNgiqOd/t kkLcJHqE8KNoX1PYf/WAym2qKokRJS3zfX8N6PbwrtO0KAzEgUdBnJ8xWJTOL9AwpVmV 4DRQ== X-Gm-Message-State: AElRT7Gsx8/tkjhPnki56WrAWda33qr/F75BS58tZ7yX/vGNAyRAvwMV HOQzLkrM8edaUQcznXobZwLFuWXh X-Google-Smtp-Source: AG47ELuxtXl4DpWeT5+DcJoYbhXqJM+5pLrcWu9Zmr/Y+CCIPQz7D7+LtpWr9Cl+MUtlYmAHbQ76fQ== X-Received: by 10.55.12.66 with SMTP id 63mr45631699qkm.12.1520617780368; Fri, 09 Mar 2018 09:49:40 -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.37 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 09 Mar 2018 09:49:39 -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 01/13] [media] xilinx: regroup caps on querycap Date: Fri, 9 Mar 2018 14:49:08 -0300 Message-Id: <20180309174920.22373-2-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 To better organize the code we concentrate the setting of V4L2_CAP_STREAMING in one place. Signed-off-by: Gustavo Padovan --- drivers/media/platform/xilinx/xilinx-dma.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/xilinx/xilinx-dma.c b/drivers/media/platform/xilinx/xilinx-dma.c index 522cdfdd3345..565e466ba4fa 100644 --- a/drivers/media/platform/xilinx/xilinx-dma.c +++ b/drivers/media/platform/xilinx/xilinx-dma.c @@ -494,13 +494,14 @@ xvip_dma_querycap(struct file *file, void *fh, struct v4l2_capability *cap) struct v4l2_fh *vfh = file->private_data; struct xvip_dma *dma = to_xvip_dma(vfh->vdev); - cap->capabilities = V4L2_CAP_DEVICE_CAPS | V4L2_CAP_STREAMING + cap->device_caps = V4L2_CAP_STREAMING; + cap->capabilities = cap->device_caps | V4L2_CAP_DEVICE_CAPS | dma->xdev->v4l2_caps; if (dma->queue.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; strlcpy(cap->driver, "xilinx-vipp", sizeof(cap->driver)); strlcpy(cap->card, dma->video.name, sizeof(cap->card));