Received: by 2002:a05:6a10:2726:0:0:0:0 with SMTP id ib38csp685006pxb; Tue, 5 Apr 2022 18:43:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwGgfMjwgdV1Iy41XLBYOREpNtqRKEMq1CB0x0Bh4kOqHobpv/j93t5xJzq88ApqAAXGjDp X-Received: by 2002:a05:6402:1e90:b0:419:4cdc:8b05 with SMTP id f16-20020a0564021e9000b004194cdc8b05mr6401311edf.211.1649209383519; Tue, 05 Apr 2022 18:43:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649209383; cv=none; d=google.com; s=arc-20160816; b=DwyclvibMDxjh0VIabhEIDRGvulqxH4vPJERAxq4jBp4o7Gvohg0CvMVir2E7Ca22l Wwho0hOCyArO4mUxQsMtFoU9rW0Zb9Po9PI5VyvkcBAPsOmufITpP4ZVL7hPxsJwssWY uEggU/mLKN1j9g7fze4ja5/oMxd3yhyibBVOOkf4fCuUADXrsBQFYmBN+wmXBWMHQKVg +NN8u9jMlcq5NO+6IbsuhH7kQHKMB8A9dPiIXrGdrJLy7ttxsEyUQ3Pd68GueAZP1iS2 PJ5ALYfPdT/UxjuxijJmVyOAR7+s/H1+2bKAPkYr/DjC11nwRvrp/VK+RcgAx1OqZ7H2 10fQ== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=FI4YHRy6J3qnGTJCBIBavEyGUTYCGHmYtWVV8kHGU58=; b=D6oVAErerOUPxaPksOWC4c1QcTGlKXCNnnb2OiaKQqGYFRRxcuHesifVDXCqDqnJ6p O2c2zDetrIi4o1TK/iuRhoA6XWWwEdwblsCMTvYdodrIdFcG/TJZP5JOAr6Vk6mHhV7W tClICduPBZ+mgzMeYRPLMywBy+USioZqxGUtFKV+aW9U/994j3+KXOwGvjeBJ6U5LOm+ 3K7opLinILMYFG6b8uekXqqq/DgVQ597Kz/h8u91QZuwYiTn4zEjL12hKttlZoX5YZat Knt1MQVtbfVKKUnE44mUHpLxBasBVSqJsI9jSHPR9WRpdJ8sPXzPDtYHQCEqx+EnewXY UEVQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=dk8Qr+Te; 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=linuxfoundation.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d13-20020a50cf4d000000b00418c2b5be97si10813307edk.377.2022.04.05.18.42.34; Tue, 05 Apr 2022 18:43:03 -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=@linuxfoundation.org header.s=korg header.b=dk8Qr+Te; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1386187AbiDEMkb (ORCPT + 99 others); Tue, 5 Apr 2022 08:40:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51014 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236425AbiDEJCz (ORCPT ); Tue, 5 Apr 2022 05:02:55 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4BFFC11A06; Tue, 5 Apr 2022 01:54:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id D835861562; Tue, 5 Apr 2022 08:54:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E360EC385A1; Tue, 5 Apr 2022 08:54:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1649148879; bh=7oMBxw5Ep26R/6R297Y09+0/4ozMGQM2xnuGuzQcQu8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dk8Qr+Te81dPxZVCSbh8y/S3iONerNSiUrK8Y+YF39PEubH4FXFKBkhc6lc4RvAxs 4gSH3mRKPr3KpoNijyDXXfgxcOp/JXTM2poEn9wWBWNHUzwpV6rbkp9hEV0Vhk+Xcu gigmfFkny5VTYuFNAW+Hee+nZVCZ6wlBPX5ziRWE= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Lad Prabhakar , Florian Fainelli , Wolfram Sang , Sasha Levin Subject: [PATCH 5.16 0476/1017] i2c: bcm2835: Use platform_get_irq() to get the interrupt Date: Tue, 5 Apr 2022 09:23:09 +0200 Message-Id: <20220405070408.427795995@linuxfoundation.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220405070354.155796697@linuxfoundation.org> References: <20220405070354.155796697@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,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 From: Lad Prabhakar [ Upstream commit c3b2f911ac11892b672df7829becf28d3a830073 ] 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 bypasses the hierarchical setup and messes 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: Lad Prabhakar Reviewed-by: Florian Fainelli Signed-off-by: Wolfram Sang Signed-off-by: Sasha Levin --- drivers/i2c/busses/i2c-bcm2835.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/drivers/i2c/busses/i2c-bcm2835.c b/drivers/i2c/busses/i2c-bcm2835.c index ad3b124a2e37..5149454eef4a 100644 --- a/drivers/i2c/busses/i2c-bcm2835.c +++ b/drivers/i2c/busses/i2c-bcm2835.c @@ -407,7 +407,7 @@ static const struct i2c_adapter_quirks bcm2835_i2c_quirks = { static int bcm2835_i2c_probe(struct platform_device *pdev) { struct bcm2835_i2c_dev *i2c_dev; - struct resource *mem, *irq; + struct resource *mem; int ret; struct i2c_adapter *adap; struct clk *mclk; @@ -457,12 +457,9 @@ static int bcm2835_i2c_probe(struct platform_device *pdev) return ret; } - irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0); - if (!irq) { - dev_err(&pdev->dev, "No IRQ resource\n"); - return -ENODEV; - } - i2c_dev->irq = irq->start; + i2c_dev->irq = platform_get_irq(pdev, 0); + if (i2c_dev->irq < 0) + return i2c_dev->irq; ret = request_irq(i2c_dev->irq, bcm2835_i2c_isr, IRQF_SHARED, dev_name(&pdev->dev), i2c_dev); -- 2.34.1