pinctrl: Use dev_fwnode()

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>
This commit is contained in:
Jiri Slaby (SUSE)
2025-06-18 13:32:11 +02:00
committed by Linus Walleij
parent 5409d619f1
commit 9576e8d3c4
3 changed files with 6 additions and 6 deletions
+2 -2
View 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;
+3 -3
View 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");
+1 -1
View 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) {