From patchwork Thu Aug 22 22:56:29 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 13774329 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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 9E52BC5320E for ; Thu, 22 Aug 2024 22:57:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=C6TJ96Rt/Q0LqA30w3gg8EpFBuPCbShBcl4sVF2nk0M=; b=r++2jRmkgBqQy4/z+s0A+FYxjO wb1YBJ/PVlNfWF3QyDI3/R1nNS3UWuzOJl506NrMWng6qG85YA0Nd664f94UByErwpLIIjzWZhEeE rWdmUFGtdng2CKNO4zdMIa4lozIWUS+Q1eHPi4xp5QGKGq4sGb4gi5wIAOYbUBoiWvH9CuDQh6kMM pNeqawJj047KxnXj4lXi64ECwXXz8GO4/RGQMyY8/dhMzbM+hOeIjnANKouIBv/dtW+TeroDn8Nav DKEATvm+gSFO5W9GxI+j2RzAcL2zcVslqBD9VUe3wuhVTK4kls1J3mZQXvA/FqAt4fI2GpAgVJ6kU fhVA1eYg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1shGk4-0000000EXiX-0joJ; Thu, 22 Aug 2024 22:57:20 +0000 Received: from fgw23-7.mail.saunalahti.fi ([62.142.5.84]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1shGjJ-0000000EXdc-2L8O for linux-arm-kernel@lists.infradead.org; Thu, 22 Aug 2024 22:56:34 +0000 Received: from localhost (88-113-25-87.elisa-laajakaista.fi [88.113.25.87]) by fgw23.mail.saunalahti.fi (Halon) with ESMTP id c5724119-60d9-11ef-822f-005056bdfda7; Fri, 23 Aug 2024 01:56:31 +0300 (EEST) From: Andy Shevchenko To: linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: Linus Walleij , Bartosz Golaszewski , Kunihiko Hayashi , Masami Hiramatsu , Andy Shevchenko Subject: [PATCH v1 1/1] gpio: uniphier: Replace of_node_to_fwnode() with more suitable API Date: Fri, 23 Aug 2024 01:56:29 +0300 Message-ID: <20240822225629.707365-1-andy.shevchenko@gmail.com> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240822_155633_772111_F1EC8072 X-CRM114-Status: GOOD ( 11.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org of_node_to_fwnode() is a IRQ domain specific implementation of of_fwnode_handle(). Replace the former with more suitable API. Signed-off-by: Andy Shevchenko --- drivers/gpio/gpio-uniphier.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/gpio/gpio-uniphier.c b/drivers/gpio/gpio-uniphier.c index 1f440707f8f4..da99ba13e82d 100644 --- a/drivers/gpio/gpio-uniphier.c +++ b/drivers/gpio/gpio-uniphier.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -164,7 +165,7 @@ static int uniphier_gpio_to_irq(struct gpio_chip *chip, unsigned int offset) if (offset < UNIPHIER_GPIO_IRQ_OFFSET) return -ENXIO; - fwspec.fwnode = of_node_to_fwnode(chip->parent->of_node); + fwspec.fwnode = dev_fwnode(chip->parent); fwspec.param_count = 2; fwspec.param[0] = offset - UNIPHIER_GPIO_IRQ_OFFSET; /* @@ -404,7 +405,7 @@ static int uniphier_gpio_probe(struct platform_device *pdev) priv->domain = irq_domain_create_hierarchy( parent_domain, 0, UNIPHIER_GPIO_IRQ_MAX_NUM, - of_node_to_fwnode(dev->of_node), + dev_fwnode(dev), &uniphier_gpio_irq_domain_ops, priv); if (!priv->domain) return -ENOMEM;