From patchwork Thu Jun 4 07:26:53 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xia Jiang X-Patchwork-Id: 11587177 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F22161392 for ; Thu, 4 Jun 2020 07:35:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id C3BE2207D3 for ; Thu, 4 Jun 2020 07:35:01 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="McZCxLA1"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=mediatek.com header.i=@mediatek.com header.b="RPmaG6bg" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org C3BE2207D3 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mediatek.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org 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=xsdipqy4dAFjdVDb4hbL4DrxGs2R51yp6sDBJfVHw28=; b=McZCxLA1xLMh2c PpmNACHh1+9HFr8ZRgcHty9vh9tpHClJ4Xsotzvz2EJP/wrJyCrP8Eqr7htEkEmKXvhnXfq44UfyS jWkimIzr4pEEd3GsEIyVSdD7mUoAz9lFe329uqHJ/HOcKjDD3YaQltJ96sED6s/cxgChALEODJfdL Axbedt0OWv6b0XelNsK1z3cn46bo/rTS9Bbw4pGFeg5SXB9X9v77cockWVm6K8YGzobP/cCwOEX3v cRf8AKPRC/TVfmgxAPUV/ycTpdsbgxZuKHIw1XEFJffdJoB8lfb4W9ckg0nn5TkgTLI+i7JcUi5nU 4G7lQKRsgy4SSgnZFN7g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgkOx-0001f6-2j; Thu, 04 Jun 2020 07:34:59 +0000 Received: from mailgw02.mediatek.com ([216.200.240.185]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jgkOT-00019U-7e; Thu, 04 Jun 2020 07:34:33 +0000 X-UUID: a632c601bfde4f27a833f8f2bc082353-20200603 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mediatek.com; s=dk; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Date:Subject:CC:To:From; bh=1t3HNytBAi0W3bOjbjl3A2ri2OH+ls+Xo4TSymJgodk=; b=RPmaG6bgXWhefEntEd1jxyQt2e3VE/TKfD2ANkzf1io7p0iSQSL/F4kXHGmp41uFPI2QLLKJljsIznS+8Xgg8M8+QBe6+JY7xl/HY10/dS/E248LMTyZ68ZMLZRNMpR6JVtCHojUjnCx41QjMJD1lDoscDHEPdIjmenwCOwi3k8=; X-UUID: a632c601bfde4f27a833f8f2bc082353-20200603 Received: from mtkcas66.mediatek.inc [(172.29.193.44)] by mailgw02.mediatek.com (envelope-from ) (musrelay.mediatek.com ESMTP with TLS) with ESMTP id 574221367; Wed, 03 Jun 2020 23:34:18 -0800 Received: from mtkmbs07n1.mediatek.inc (172.21.101.16) by MTKMBS62N1.mediatek.inc (172.29.193.41) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 4 Jun 2020 00:29:18 -0700 Received: from MTKCAS06.mediatek.inc (172.21.101.30) by mtkmbs07n1.mediatek.inc (172.21.101.16) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Thu, 4 Jun 2020 15:29:16 +0800 Received: from localhost.localdomain (10.17.3.153) by MTKCAS06.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1497.2 via Frontend Transport; Thu, 4 Jun 2020 15:29:15 +0800 From: Xia Jiang To: Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , "Matthias Brugger" , Rick Chang Subject: [PATCH v9 03/18] media: platform: Improve getting and requesting irq flow for bug fixing Date: Thu, 4 Jun 2020 15:26:53 +0800 Message-ID: <20200604072708.9468-4-xia.jiang@mediatek.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20200604072708.9468-1-xia.jiang@mediatek.com> References: <20200604072708.9468-1-xia.jiang@mediatek.com> MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200604_003429_454430_64CD1C0D X-CRM114-Status: GOOD ( 10.34 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-0.2 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 MIME_BASE64_TEXT RAW: Message text disguised using base64 encoding -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.0 UNPARSEABLE_RELAY Informational: message has unparseable relay lines X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: maoguang.meng@mediatek.com, devicetree@vger.kernel.org, mojahsu@chromium.org, srv_heupstream@mediatek.com, linux-kernel@vger.kernel.org, Tomasz Figa , senozhatsky@chromium.org, sj.huang@mediatek.com, drinkcat@chromium.org, linux-mediatek@lists.infradead.org, Xia Jiang , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Marek Szyprowski Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org Delete platform_get_resource operation for irq. Return actual value rather than EINVAL when fail to get and request irq. Reviewed-by: Tomasz Figa Signed-off-by: Xia Jiang --- v9: no changes --- drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c index 67a022d04df7..2677580941b0 100644 --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c @@ -1103,12 +1103,10 @@ static int mtk_jpeg_probe(struct platform_device *pdev) return ret; } - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); dec_irq = platform_get_irq(pdev, 0); - if (!res || dec_irq < 0) { + if (dec_irq < 0) { dev_err(&pdev->dev, "Failed to get dec_irq %d.\n", dec_irq); - ret = -EINVAL; - return ret; + return dec_irq; } ret = devm_request_irq(&pdev->dev, dec_irq, mtk_jpeg_dec_irq, 0, @@ -1116,7 +1114,6 @@ static int mtk_jpeg_probe(struct platform_device *pdev) if (ret) { dev_err(&pdev->dev, "Failed to request dec_irq %d (%d)\n", dec_irq, ret); - ret = -EINVAL; goto err_req_irq; }