Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp104400pxm; Fri, 25 Feb 2022 04:55:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8s9efihq5ST1Tpmq9Bw98aQmmXeHwYqB8Ng7m8XbQnM/9Pq5WFNa8ol930KJbWr9qxmau X-Received: by 2002:a62:1d07:0:b0:4bf:3782:22e3 with SMTP id d7-20020a621d07000000b004bf378222e3mr7710702pfd.52.1645793707703; Fri, 25 Feb 2022 04:55:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645793707; cv=none; d=google.com; s=arc-20160816; b=IfnswO6ts3fj/9NRzNGRkkzt4VlcY1Lef/47e1Yw/sELSann6R55wKdcJz0uUCbgIb 6OLv9UTEnPLkAMm9lHmLwV457DQl/udENOAp5thtInN/qkRnQ/AGEELhPj3PMx0K047A RLcCBplCSLCDchpr8HnhyIjdxl4mZzUa9MYxIJR7aHmzmVeKV3dNi/2RYXinZp2fzVRE SqTC5nrYPJFWVJ2QBTGSEEFDBR/euZOQNIJd3lnVbXEsjHwp+cbkBx/DurgZeIQm1qXI AFx1ocB41RKypAeBKNzffqn7huC83Kq+CVV6DV0Ymh8AGiiEO3yae2DOcx/droqMvyca 3QKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:feedback-id:content-transfer-encoding :mime-version:message-id:date:subject:cc:to:from; bh=n/Aq3EYVaxf6a8N0l9NfvrD0SNCxwvcwyiDjG8Buvnc=; b=YO04Co5SAgQewD7w+nuFCmwirXnADTd49EFpCc9fnpPl2W/kZxpeAUWgZa8LOMBCS6 cvoWCu6kFCIJwHoQo4JNz026gWZgwqVM0gVYdLLypOY/eC0SO7PqfiM952Je7i6esOj8 KCNiVxHJB5ylq+ko8NoMYxx/UIyCsqly0++DRGqlph7stCELvgD/SEGtNQetsloqqWZd D6OvWp0h1Xd2JqgIh6vI2LqtQxOX9Y2Kxy3nnlj8jzbPSd67KULjgV7O4Juj4vMgSOHe lyHs+xmJ8dDAxoQanXhjXFydW2R0Fb4RF+M7tlD6/ZYWEjbhGr8zkGXhHOm9Icu9GU0+ +PFA== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g2-20020a17090a714200b001bb80e872acsi7083731pjs.157.2022.02.25.04.54.52; Fri, 25 Feb 2022 04:55:07 -0800 (PST) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239996AbiBYLUq (ORCPT + 99 others); Fri, 25 Feb 2022 06:20:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34210 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235085AbiBYLUp (ORCPT ); Fri, 25 Feb 2022 06:20:45 -0500 Received: from smtpbgsg1.qq.com (smtpbgsg1.qq.com [54.254.200.92]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1155921DF19 for ; Fri, 25 Feb 2022 03:20:11 -0800 (PST) X-QQ-mid: bizesmtp74t1645787977tb99bvk4 Received: from localhost.localdomain (unknown [58.240.82.166]) by bizesmtp.qq.com (ESMTP) with id ; Fri, 25 Feb 2022 19:19:31 +0800 (CST) X-QQ-SSF: 01400000002000C0F000000A0000000 X-QQ-FEAT: JRmPfD6HWhwtEx95bUE3TkDE0Zl0T/p5bw+l9Du6N8AbfR6XjS0YDNEzACYAx IjtVDQf6ogeyNJNbXUefxDlGFp79P85xICFE3BGBqXvxNhTOhwZ7OBVIF5R5745EUA81A90 wdr6B/k31D97kERdVqHlr6COgAOzp0lSQmIFIXQWVjqFrNaLRsYVzx5nx/31HA3MuOCmqOp oCkW7IIAilf12fRNwDuFT7UCYiZEnsed1W1QB9tJFgbSEXhM1WW77Q81BeXvqmbGrXvG3MP xA9AZxoZ+Nt/54JB3VZkqSiP+1gpGIV2SgYgNFeshXA43FvbgjIwatMnaJBkEd6cJ+vhsH1 TuKAVs/hqP4yWB2otd3RenxbL6N8ELgQ9PgymW2SdsrfK4rsJA= X-QQ-GoodBg: 1 From: Meng Tang To: perex@perex.cz, tiwai@suse.com Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, Meng Tang Subject: [PATCH] sound/mips: Use platform_get_irq() to get the interrupt Date: Fri, 25 Feb 2022 19:19:29 +0800 Message-Id: <20220225111929.17194-1-tangmeng@uniontech.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-QQ-SENDSIZE: 520 Feedback-ID: bizesmtp:uniontech.com:qybgforeign:qybgforeign1 X-QQ-Bgrelay: 1 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE 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 platform_get_resource(pdev, IORESOURCE_IRQ, ..) relies on static allocation of IRQ resources in DT core code, this causes an issue when using hierarchical interrupt domains using "interrupts" property in the node as this bypassed the hierarchical setup and messed up the irq chaining. In preparation for removal of static setup of IRQ resource from DT core code use platform_get_irq(). Signed-off-by: Meng Tang --- sound/mips/snd-n64.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/sound/mips/snd-n64.c b/sound/mips/snd-n64.c index 463a6fe589eb..bff6d85b8fe2 100644 --- a/sound/mips/snd-n64.c +++ b/sound/mips/snd-n64.c @@ -289,8 +289,7 @@ static int __init n64audio_probe(struct platform_device *pdev) struct snd_card *card; struct snd_pcm *pcm; struct n64audio *priv; - struct resource *res; - int err; + int err, irq; err = snd_card_new(&pdev->dev, SNDRV_DEFAULT_IDX1, SNDRV_DEFAULT_STR1, @@ -337,12 +336,12 @@ static int __init n64audio_probe(struct platform_device *pdev) strcpy(card->shortname, "N64 Audio"); strcpy(card->longname, "N64 Audio"); - res = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!res) { + irq = platform_get_irq(pdev, 0); + if (irq < 0) { err = -EINVAL; goto fail_dma_alloc; } - if (devm_request_irq(&pdev->dev, res->start, n64audio_isr, + if (devm_request_irq(&pdev->dev, irq, n64audio_isr, IRQF_SHARED, "N64 Audio", priv)) { err = -EBUSY; goto fail_dma_alloc; -- 2.20.1