From patchwork Sat Mar 19 16:31:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 553255 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F383C433FE for ; Sat, 19 Mar 2022 16:31:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243668AbiCSQdM (ORCPT ); Sat, 19 Mar 2022 12:33:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37654 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243669AbiCSQdL (ORCPT ); Sat, 19 Mar 2022 12:33:11 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D096623F9CF for ; Sat, 19 Mar 2022 09:31:49 -0700 (PDT) Received: from pendragon.lan (62-78-145-57.bb.dnainternet.fi [62.78.145.57]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id E98122CCF; Sat, 19 Mar 2022 17:31:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1647707498; bh=tcD2ACKWc9gJ6cif+GZMiiTUyuP8WlFFk5ZBdcMQ1h8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=agq+bsC4iYGQjsAIzpA3IJJ23O9bypPbG7zSYk5qfRvXppCsd3yXczyWTJJG8cTYg 3wsoNslx1ZBNxnirmBXbk2WI0lR4ZlcXLnfeI25w7YUFHk9QKTnPnCCTvj4k6cF6wE H9f5AV3OZvGAMRTbu5E8rMKMhHJqyt2vJTbl+98I= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Dafna Hirschfeld , Heiko Stuebner , Paul Elder , Tomasz Figa , linux-rockchip@lists.infradead.org Subject: [PATCH v3 17/17] media: rkisp1: capture: Bypass the main device for handling querycap Date: Sat, 19 Mar 2022 18:31:00 +0200 Message-Id: <20220319163100.3083-18-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220319163100.3083-1-laurent.pinchart@ideasonboard.com> References: <20220319163100.3083-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Paul Elder When handling querycap, the capture node would access the main rkisp1 device unnecessarily. Get the information from the most direct source. Signed-off-by: Paul Elder --- drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c index a7cf672457cd..94819e6c23e2 100644 --- a/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c +++ b/drivers/media/platform/rockchip/rkisp1/rkisp1-capture.c @@ -1248,11 +1248,8 @@ static int rkisp1_g_fmt_vid_cap_mplane(struct file *file, void *fh, static int rkisp1_querycap(struct file *file, void *priv, struct v4l2_capability *cap) { - struct rkisp1_capture *cap_dev = video_drvdata(file); - struct rkisp1_device *rkisp1 = cap_dev->rkisp1; - - strscpy(cap->driver, rkisp1->dev->driver->name, sizeof(cap->driver)); - strscpy(cap->card, rkisp1->dev->driver->name, sizeof(cap->card)); + strscpy(cap->driver, RKISP1_DRIVER_NAME, sizeof(cap->driver)); + strscpy(cap->card, RKISP1_DRIVER_NAME, sizeof(cap->card)); strscpy(cap->bus_info, RKISP1_BUS_INFO, sizeof(cap->bus_info)); return 0;