* [PATCH v1 1/1] gpio: uniphier: Replace of_node_to_fwnode() with more suitable API
@ 2024-08-22 22:56 Andy Shevchenko
2024-09-02 10:14 ` Bartosz Golaszewski
0 siblings, 1 reply; 2+ messages in thread
From: Andy Shevchenko @ 2024-08-22 22:56 UTC (permalink / raw)
To: linux-gpio, linux-arm-kernel, linux-kernel
Cc: Linus Walleij, Bartosz Golaszewski, Kunihiko Hayashi,
Masami Hiramatsu, Andy Shevchenko
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 <andy.shevchenko@gmail.com>
---
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 <linux/of.h>
#include <linux/of_irq.h>
#include <linux/platform_device.h>
+#include <linux/property.h>
#include <linux/spinlock.h>
#include <dt-bindings/gpio/uniphier-gpio.h>
@@ -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;
--
2.46.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH v1 1/1] gpio: uniphier: Replace of_node_to_fwnode() with more suitable API
2024-08-22 22:56 [PATCH v1 1/1] gpio: uniphier: Replace of_node_to_fwnode() with more suitable API Andy Shevchenko
@ 2024-09-02 10:14 ` Bartosz Golaszewski
0 siblings, 0 replies; 2+ messages in thread
From: Bartosz Golaszewski @ 2024-09-02 10:14 UTC (permalink / raw)
To: linux-gpio, linux-arm-kernel, linux-kernel, Andy Shevchenko
Cc: Bartosz Golaszewski, Linus Walleij, Bartosz Golaszewski,
Kunihiko Hayashi, Masami Hiramatsu
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
On Fri, 23 Aug 2024 01:56:29 +0300, Andy Shevchenko wrote:
> of_node_to_fwnode() is a IRQ domain specific implementation of
> of_fwnode_handle(). Replace the former with more suitable API.
>
>
Applied, thanks!
[1/1] gpio: uniphier: Replace of_node_to_fwnode() with more suitable API
commit: 0a0d849c70de3949646b242209bcf0e3c488da7d
Best regards,
--
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-09-02 10:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-22 22:56 [PATCH v1 1/1] gpio: uniphier: Replace of_node_to_fwnode() with more suitable API Andy Shevchenko
2024-09-02 10:14 ` Bartosz Golaszewski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).