]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
pinctrl: Use dev_fwnode()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 11 Jun 2025 10:43:45 +0000 (12:43 +0200)
committerLinus Walleij <linus.walleij@linaro.org>
Wed, 18 Jun 2025 11:32:11 +0000 (13:32 +0200)
irq_domain_create_simple() takes fwnode as the first argument. It can be
extracted from the struct device using dev_fwnode() helper instead of
using of_node with of_fwnode_handle().

So use the dev_fwnode() helper.

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Acked-by: Chen-Yu Tsai <wens@sie.org>
Link: https://lore.kernel.org/20250611104348.192092-17-jirislaby@kernel.org
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/pinctrl/mediatek/mtk-eint.c
drivers/pinctrl/pinctrl-at91-pio4.c
drivers/pinctrl/sunxi/pinctrl-sunxi.c

index d906a5e4101fb10968035fc48e9cf4a444d063a9..9f175c73613f84b47c0160947f32da7aca7d5a18 100644 (file)
@@ -561,8 +561,8 @@ int mtk_eint_do_init(struct mtk_eint *eint, struct mtk_eint_pin *eint_pin)
                        goto err_eint;
        }
 
-       eint->domain = irq_domain_create_linear(of_fwnode_handle(eint->dev->of_node),
-                                               eint->hw->ap_num, &irq_domain_simple_ops, NULL);
+       eint->domain = irq_domain_create_linear(dev_fwnode(eint->dev), eint->hw->ap_num,
+                                               &irq_domain_simple_ops, NULL);
        if (!eint->domain)
                goto err_eint;
 
index ca8a54a43ff5c0a3c0086be11f06f820ebdb3e15..57f105ac962da920ccaa27d279ccafb37ced0144 100644 (file)
@@ -1212,9 +1212,9 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
                dev_dbg(dev, "bank %i: irq=%d\n", i, ret);
        }
 
-       atmel_pioctrl->irq_domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node),
-                       atmel_pioctrl->gpio_chip->ngpio,
-                       &irq_domain_simple_ops, NULL);
+       atmel_pioctrl->irq_domain = irq_domain_create_linear(dev_fwnode(dev),
+                                                            atmel_pioctrl->gpio_chip->ngpio,
+                                                            &irq_domain_simple_ops, NULL);
        if (!atmel_pioctrl->irq_domain)
                return dev_err_probe(dev, -ENODEV, "can't add the irq domain\n");
 
index bf8612d72daacdde6209b0b5c84e010ef3b846c9..a090d78a34135491a9d3b28fa083980483e7d562 100644 (file)
@@ -1646,7 +1646,7 @@ int sunxi_pinctrl_init_with_flags(struct platform_device *pdev,
                }
        }
 
-       pctl->domain = irq_domain_create_linear(of_fwnode_handle(node),
+       pctl->domain = irq_domain_create_linear(dev_fwnode(&pdev->dev),
                                                pctl->desc->irq_banks * IRQ_PER_BANK,
                                                &sunxi_pinctrl_irq_domain_ops, pctl);
        if (!pctl->domain) {