Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp47307pxp; Tue, 8 Mar 2022 19:57:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJyJiBopCxDDSWOfUPt407wQT5Giwv/3AoyvQ6vQ7GUBzts9uilNqmz7EVzQ1e964/v+IfKI X-Received: by 2002:a17:90b:1e43:b0:1bf:920:8a26 with SMTP id pi3-20020a17090b1e4300b001bf09208a26mr8194679pjb.52.1646798226729; Tue, 08 Mar 2022 19:57:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646798226; cv=none; d=google.com; s=arc-20160816; b=Wx7RFrgwjrRbQvUWx4jFPNd2XLhp7rV02LJM4sGraxwVuBbFTipdjGmmxgdUIvDH1x SXN5Jxcu70d9AyuSgmrjoSk8lRRhOBLbkCQipodY7gucDlKKeEJOCmGPGGwCqOs54r96 QUh4Xo12ryFOILPDCB24lgROA5lrqK3QGwIUQO6+SODMwVm2YSUb2A6a7p4J+t8q9ZDi XXr9RScEvACPoku3jCsE8o2P3k8Mol5d/ZWaGu80ke0+itykPD307xVEe75906aPxGxk SJHWQ2KAlg/s9e2jW26hHCgK2hBNMz6+at8WLHrNedfUA3JQFtbV50uFKxMDti9Bkf4q GjoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=eNLHA9N4r4aIWE8DeGEVOgoiZevArb3vnmHjnclBokU=; b=DanlXmzAgj1RNx0K8UXANiSuMxP/wrnm3cfdVZPp51p2OR/w8eTmgulJ9MIs2JyF99 A1v4m/CqtFX8fjMbJE3aKoo1cmqycf8g0aIlP/JkamnbOm8ny6mZwyKDROpUS053DiQa lnj6ZbByBNnhb6r9s5EuE4x6AWA+sF68M6TnlwFWF/x4u3jBRpiTEvjVQLXW6qfWWHTo iUFHJvvpOmjmdiYqaiFEsV5AEtll0WHLqn0oLeuP9YG5Lhj9/pqjV9NFJFNyKE3+SoiA R11zAORp6xW5Xu5DDPZncy1ffaflffhnoGaX2OouXKuipU+Wpmde2xk/F/YHBH2GOP53 8mZA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KT6+0BEk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id r11-20020a17090a2e8b00b001bf37e05b24si4133306pjd.130.2022.03.08.19.57.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 19:57:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=KT6+0BEk; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id F14FD15F081; Tue, 8 Mar 2022 19:57:03 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231848AbiCID55 (ORCPT + 99 others); Tue, 8 Mar 2022 22:57:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39252 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231905AbiCID54 (ORCPT ); Tue, 8 Mar 2022 22:57:56 -0500 Received: from mail-qt1-x835.google.com (mail-qt1-x835.google.com [IPv6:2607:f8b0:4864:20::835]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B7FC15DDD0; Tue, 8 Mar 2022 19:56:57 -0800 (PST) Received: by mail-qt1-x835.google.com with SMTP id 11so929242qtt.9; Tue, 08 Mar 2022 19:56:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eNLHA9N4r4aIWE8DeGEVOgoiZevArb3vnmHjnclBokU=; b=KT6+0BEk9a7VYOIkB7lwjto6+7w1Ifuaqfgb9nPAXaGt/P3auBOyymDZrMqjte+Ia1 oaXMB8zKkh4LgVEdwBRpgEtg9jJx59ELVoUqugrtQShBZZoDdBjZrKImT2SCPbdwAki7 Dm2dUYIK+hS+lgb/1zEkCeBKO03NEis9yWhsRbPy3PW++qweD+WZzn5HrA7EDJvSYxiO /Y2XR11WLMCvWR/TY1WnYXPZwinfONDjCI2eG/JvTmhkn0Axr/mQEMybMn0HdIm2PaKn CQ5Dd2b71OjUXx1zufajp4qdhMdX2dMmp4/K70BYkyo5xrBe2KUVxWtggUJEbF4SMgNj VMqg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=eNLHA9N4r4aIWE8DeGEVOgoiZevArb3vnmHjnclBokU=; b=quGKK02VAsJ5naAf6pGo00X+JGPDkzoUbNNjy4TtK3YMVgdEeExhUrweZQlWAU8cg6 zJGzWRwE3ESsCwKSMY6MGK9fQm2Yirn0BiHEVa3QqW8oNICD9QAWes1vAfQUOBU7Ll4W W9NqZL/CrhfuodjsWJV0MA1Np1IsvkKiL1Pg3DYy7Ml9XtObCOyVrJv6Y4PeJG+Hzdd6 jTPnJmEvVQHSQv99vq2rMU3fYaMLII6ImSgyas82XGsAU7kywNNa1D4rJ2/BTQVQ326p BTKkcD+BD5iRHxBS80il3cB7hFk4j00hYPKeoRtckjLPrkkjPbtRgObS/loRNXJVyzFw lpzA== X-Gm-Message-State: AOAM533il9TdLRcXeJDtEvm0lEQi/IdDNxM+TK0XwiwL+0eSXWzs9j0V g1ASyHxbHexs5839oWD4zO0= X-Received: by 2002:ac8:5e07:0:b0:2dc:ed40:d01a with SMTP id h7-20020ac85e07000000b002dced40d01amr16426379qtx.286.1646798216247; Tue, 08 Mar 2022 19:56:56 -0800 (PST) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id bq42-20020a05620a46aa00b006494fb49246sm425299qkb.86.2022.03.08.19.56.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 08 Mar 2022 19:56:55 -0800 (PST) From: cgel.zte@gmail.com X-Google-Original-From: chi.minghao@zte.com.cn To: prabhakar.csengg@gmail.com Cc: mchehab@kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, Minghao Chi , Zeal Robot Subject: [PATCH] media:davinci:vpbe_display: Use platform_get_irq() to get the interrupt Date: Wed, 9 Mar 2022 03:56:48 +0000 Message-Id: <20220309035648.2080945-1-chi.minghao@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Minghao Chi (CGEL ZTE) It is not recommened to use platform_get_resource(pdev, IORESOURCE_IRQ) for requesting IRQ's resources any more, as they can be not ready yet in case of DT-booting. platform_get_irq() instead is a recommended way for getting IRQ even if it was not retrieved earlier. It also makes code simpler because we're getting "int" value right away and no conversion from resource to int is required. Reported-by: Zeal Robot Signed-off-by: Minghao Chi (CGEL ZTE) --- drivers/media/platform/davinci/vpbe_display.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/davinci/vpbe_display.c b/drivers/media/platform/davinci/vpbe_display.c index bf3c3e76b921..e0aabcb333ac 100644 --- a/drivers/media/platform/davinci/vpbe_display.c +++ b/drivers/media/platform/davinci/vpbe_display.c @@ -1363,7 +1363,6 @@ static int vpbe_display_probe(struct platform_device *pdev) { struct vpbe_display *disp_dev; struct v4l2_device *v4l2_dev; - struct resource *res = NULL; struct vb2_queue *q; int k; int i; @@ -1405,14 +1404,13 @@ static int vpbe_display_probe(struct platform_device *pdev) } } - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!res) { + irq = platform_get_irq(pdev, 0); + if (irq < 0) { v4l2_err(v4l2_dev, "Unable to get VENC interrupt resource\n"); err = -ENODEV; goto probe_out; } - irq = res->start; err = devm_request_irq(&pdev->dev, irq, venc_isr, 0, VPBE_DISPLAY_DRIVER, disp_dev); if (err) { -- 2.25.1