From patchwork Thu Apr 25 07:12:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Boris Brezillon X-Patchwork-Id: 10916149 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0DDE21805 for ; Thu, 25 Apr 2019 07:13:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EC17A28B21 for ; Thu, 25 Apr 2019 07:13:08 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E051128B50; Thu, 25 Apr 2019 07:13:08 +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=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8765928BE1 for ; Thu, 25 Apr 2019 07:13:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=Ckt4+/x8qvngLzMh2eckvIzXBEwJr+i3G2d/j5eWcX4=; b=r72zEMshOuGZ6y 6hJaLAjd46EXAY9+0iw7dE5MaFB3bdlFtWZmLuqMP5viFvrFuPU27MEof9mM+6drnhCj46F9QtqAp MvcO2kabnMY+o3AGbyOhsjDzkcQdo/40lj76vVevmv1D4Fk1Qm6HfGThn7Kunzey9uq2udCFpRIT3 JkpMs5VWGO6vqpZe/E0dakl/b6sIyTYKU058fHBU6jLBUy3hU+9fFvyoGw24hmxaDSw5E3jo2Ty0b wuiiGffav+nqy+DjDigtQKIgw/P1xJVfNqQIyuVPSg+fs8Ju92rTrfuyouYOQa213gdeTJ1Yf1nq0 uS/SfZiCMuM4k5ST1OtQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJYZ7-0001U9-86; Thu, 25 Apr 2019 07:13:05 +0000 Received: from bhuna.collabora.co.uk ([2a00:1098:0:82:1000:25:2eeb:e3e3]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1hJYYw-0001FI-Vl for linux-rockchip@lists.infradead.org; Thu, 25 Apr 2019 07:12:58 +0000 Received: from localhost.localdomain (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id 38A33282F46; Thu, 25 Apr 2019 08:12:49 +0100 (BST) From: Boris Brezillon To: Mauro Carvalho Chehab , Hans Verkuil , Laurent Pinchart , Sakari Ailus , linux-media@vger.kernel.org Subject: [PATCH v4 06/21] rockchip/vpu: Do not request id 0 for our video device Date: Thu, 25 Apr 2019 09:12:27 +0200 Message-Id: <20190425071242.18315-7-boris.brezillon@collabora.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190425071242.18315-1-boris.brezillon@collabora.com> References: <20190425071242.18315-1-boris.brezillon@collabora.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190425_001255_432762_5092DD91 X-CRM114-Status: GOOD ( 13.91 ) X-BeenThere: linux-rockchip@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Upstream kernel work for Rockchip platforms List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tomasz Figa , Heiko Stuebner , Jonas Karlman , Nicolas Dufresne , Paul Kocialkowski , linux-rockchip@lists.infradead.org, Boris Brezillon , kernel@collabora.com, Ezequiel Garcia Sender: "Linux-rockchip" Errors-To: linux-rockchip-bounces+patchwork-linux-rockchip=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Jonas Karlman Pass -1 to video_register_device() to let the core assign the first free id instead of trying to get id 0. In practice it doesn't make a difference since video_register_device() is not strict about id requests and will anyway pick the first free id starting at the id passed in argument, and passing -1 has the same effect as passing 0. But let's comply with the API doc and pass -1 here. Signed-off-by: Jonas Karlman Signed-off-by: Boris Brezillon --- Changes from v3: * New patch --- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c index b68c4fc2967c..baed9e205320 100644 --- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c +++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c @@ -348,7 +348,7 @@ static int rockchip_vpu_video_device_register(struct rockchip_vpu_dev *vpu) vpu->vfd_enc = vfd; video_set_drvdata(vfd, vpu); - ret = video_register_device(vfd, VFL_TYPE_GRABBER, 0); + ret = video_register_device(vfd, VFL_TYPE_GRABBER, -1); if (ret) { v4l2_err(&vpu->v4l2_dev, "Failed to register video device\n"); goto err_free_dev;