Received: by 2002:ac0:e34a:0:0:0:0:0 with SMTP id g10csp711267imn; Tue, 26 Jul 2022 07:22:54 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t0C6y5PRZSqGn5kyFfe87/tTuV51FVftw4YQUd9HbJoyXXW1MTTfKrNJofCUDsK4T2kTRT X-Received: by 2002:a17:90b:702:b0:1f2:3573:9b45 with SMTP id s2-20020a17090b070200b001f235739b45mr19299813pjz.59.1658845374290; Tue, 26 Jul 2022 07:22:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658845374; cv=none; d=google.com; s=arc-20160816; b=mPDWblPeFRylx+n3AEYd36IRZlasITv2mE4WVMymTvUC8CtmWQ3tlEX95A6G+A2xWL vYngUN3jeyZECSTGlyjzdwSe5QSFp7FUV2NdZ3j8NxL667yG5D41Mb2XFhpxDaOEFp+z YTent6jdLfJCqASjqPhQ1W8yN6B++OwjNQmjInPGKFmTX19jKwPnYip2IM+HtPnQnxty CqEe/8rDcgi3DR78s3ivY5hDDSCQD9UdUBTZkjGoGFn58vtX5jdP0b1znFYldn8m6p5S QFx642us/n21/VgBoR8cAJumYogibdk6NDPW3kktcmDGMmgZbUy4xFokYGUXhRuxq0kC ytGg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Ieq2hAG4AZG/Fb6ambaVWrgPRnPACpIEU3NvgFnv4bk=; b=M1/EmJb3Ya5X22JyITfdZBvOoJjS1zgTS0fdy062b75ywL7SR42VxQmFCmdgjT0gVT A9KHXVX/WCHfhKMMqAYm2YmapIvc5wLqBo47dwD3LblRwo1VjgAy2r1bFv34cR0Ix411 JMjWtDNpZrcvPyz4g+xBZGfChdJgoCG9bQ/bBDoCVVYW3hL2Cjxp+sHkrGqbBxxgWT4F jewapPZa9jXIpsax2H9fdwQWV8wMK+UywtMl5UupGnn/mYhpqNPwHX++6XQ/E3/5QTFN GYHPHQGI+AJR0h01G4s7IRqTA3y9TsAW6bIaI/xjUfoY0ureJiNF4XdOG3e56CPB3+we 7qLA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NzcgJJa4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id j6-20020a63fc06000000b004116434c8b1si17827698pgi.389.2022.07.26.07.22.38; Tue, 26 Jul 2022 07:22:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=NzcgJJa4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239047AbiGZORv (ORCPT + 99 others); Tue, 26 Jul 2022 10:17:51 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54894 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236694AbiGZORj (ORCPT ); Tue, 26 Jul 2022 10:17:39 -0400 Received: from madras.collabora.co.uk (madras.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e5ab]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D00DA2495F for ; Tue, 26 Jul 2022 07:17:35 -0700 (PDT) Received: from IcarusMOD.eternityproject.eu (2-237-20-237.ip236.fastwebnet.it [2.237.20.237]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: kholk11) by madras.collabora.co.uk (Postfix) with ESMTPSA id 2FC926601B21; Tue, 26 Jul 2022 15:17:34 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1658845054; bh=0Pq7bNM/o1tXtZIQEeEKqw5+dJrRJyg3c7c9n4VhnQg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NzcgJJa47jvHM0qeQq11B4CvOqXuefN0JcZ8i8XG3h2Prnevck3URTpecbJQS5xA8 /C0rOFGZbYvr4B8InTEjFQKhE3MLJFB5eHYLAHn4GFm7rpB3tHM6/NxWrnPvZapvpv k3QMRHgivLoiHS/ebTvfgLCUDnXdsQcQy99UA4i0Fbl35M4kH+qOzdOUROwj3CTAoF w21vcDrJLwaEaHAhohdyZ7QjjZWXQiOA+TgnsU5WGDODPRJkwafaWA2ovUJanwRfFv ZovAk/jIYsxymyMUsJdhpfK6JgmKq8hX12P/NhYf5rlo58HnN6RJHNGh9eE6gcB43t ChflXVH5CS6Qg== From: AngeloGioacchino Del Regno To: matthias.bgg@gmail.com Cc: roger.lu@mediatek.com, khilman@baylibre.com, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org, nfraprado@collabora.com, kernel@collabora.com, AngeloGioacchino Del Regno Subject: [PATCH 2/6] soc: mediatek: mtk-svs: Switch to platform_get_irq() Date: Tue, 26 Jul 2022 16:16:49 +0200 Message-Id: <20220726141653.177948-3-angelogioacchino.delregno@collabora.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220726141653.177948-1-angelogioacchino.delregno@collabora.com> References: <20220726141653.177948-1-angelogioacchino.delregno@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Instead of using irq_of_parse_and_map() to retrieve the interrupt from devicetree, switch to platform_get_irq() instead: this function will conveniently also write an error message in case the irq is not found. Signed-off-by: AngeloGioacchino Del Regno --- drivers/soc/mediatek/mtk-svs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/soc/mediatek/mtk-svs.c b/drivers/soc/mediatek/mtk-svs.c index 600492dc334c..ee990acfc2d5 100644 --- a/drivers/soc/mediatek/mtk-svs.c +++ b/drivers/soc/mediatek/mtk-svs.c @@ -2757,8 +2757,7 @@ static struct svs_platform *svs_platform_probe(struct platform_device *pdev) static int svs_probe(struct platform_device *pdev) { struct svs_platform *svsp; - unsigned int svsp_irq; - int ret; + int svsp_irq, ret; svsp = svs_platform_probe(pdev); if (IS_ERR(svsp)) @@ -2776,7 +2775,12 @@ static int svs_probe(struct platform_device *pdev) goto svs_probe_free_resource; } - svsp_irq = irq_of_parse_and_map(svsp->dev->of_node, 0); + svsp_irq = platform_get_irq(pdev, 0); + if (svsp_irq < 0) { + ret = svsp_irq; + goto svs_probe_free_resource; + } + ret = devm_request_threaded_irq(svsp->dev, svsp_irq, NULL, svs_isr, svsp->irqflags | IRQF_ONESHOT, svsp->name, svsp); -- 2.35.1