From patchwork Wed May 31 10:05:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13261901 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8125DC77B7C for ; Wed, 31 May 2023 10:07:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235792AbjEaKHR (ORCPT ); Wed, 31 May 2023 06:07:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60408 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233058AbjEaKHQ (ORCPT ); Wed, 31 May 2023 06:07:16 -0400 Received: from frasgout.his.huawei.com (frasgout.his.huawei.com [185.176.79.56]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90F60E5; Wed, 31 May 2023 03:07:15 -0700 (PDT) Received: from lhrpeml500005.china.huawei.com (unknown [172.18.147.200]) by frasgout.his.huawei.com (SkyGuard) with ESMTP id 4QWPty2FP3z6J7jf; Wed, 31 May 2023 18:02:02 +0800 (CST) Received: from SecurePC-101-06.china.huawei.com (10.122.247.231) by lhrpeml500005.china.huawei.com (7.191.163.240) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Wed, 31 May 2023 11:06:59 +0100 From: Jonathan Cameron To: CC: Wolfram Sang , Niyas Sait , Klaus Jensen , Andy Shevchenko , , Jeremy Kerr , Matt Johnston , Shesha Bhushan Sreenivasamurthy , , , "Viacheslav A . Dubeyko" Subject: [RFC PATCH v3 2/7] i2c: aspeed: Use platform_get_irq() instead of opencoding Date: Wed, 31 May 2023 11:05:55 +0100 Message-ID: <20230531100600.13543-3-Jonathan.Cameron@huawei.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230531100600.13543-1-Jonathan.Cameron@huawei.com> References: <20230531100600.13543-1-Jonathan.Cameron@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.122.247.231] X-ClientProxiedBy: lhrpeml100006.china.huawei.com (7.191.160.224) To lhrpeml500005.china.huawei.com (7.191.163.240) X-CFilter-Loop: Reflected Precedence: bulk List-ID: X-Mailing-List: linux-cxl@vger.kernel.org A cleanup in its own right. This has the handy side effect of working for ACPI FW as well (unlike fwnode_irq_get() which works for ARM64 but not x86 ACPI) Signed-off-by: Jonathan Cameron Reviewed-by: Andy Shevchenko --- v3: Fix it's -> its in description. --- drivers/i2c/busses/i2c-aspeed.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/i2c/busses/i2c-aspeed.c b/drivers/i2c/busses/i2c-aspeed.c index d3c99c5b3247..21a2f139f445 100644 --- a/drivers/i2c/busses/i2c-aspeed.c +++ b/drivers/i2c/busses/i2c-aspeed.c @@ -19,7 +19,6 @@ #include #include #include -#include #include #include #include @@ -1043,7 +1042,10 @@ static int aspeed_i2c_probe_bus(struct platform_device *pdev) if (ret < 0) return ret; - irq = irq_of_parse_and_map(pdev->dev.of_node, 0); + irq = platform_get_irq(pdev, 0); + if (irq < 0) + return irq; + ret = devm_request_irq(&pdev->dev, irq, aspeed_i2c_bus_irq, 0, dev_name(&pdev->dev), bus); if (ret < 0)