Skip to content

Commit 219182f

Browse files
Jiri Slaby (SUSE)KAGA-KOKO
authored andcommitted
pinctrl: Switch to irq_domain_create_*()
irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original parameter. Note some of the users can likely use dev->fwnode directly instead of indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not guaranteed to be set for all, so this has to be investigated on case to case basis (by people who can actually test with the HW). [ tglx: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Reviewed-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/all/[email protected]
1 parent 4b5e1d9 commit 219182f

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

drivers/pinctrl/mediatek/mtk-eint.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -565,9 +565,8 @@ int mtk_eint_do_init(struct mtk_eint *eint)
565565
goto err_eint;
566566
}
567567

568-
eint->domain = irq_domain_add_linear(eint->dev->of_node,
569-
eint->hw->ap_num,
570-
&irq_domain_simple_ops, NULL);
568+
eint->domain = irq_domain_create_linear(of_fwnode_handle(eint->dev->of_node),
569+
eint->hw->ap_num, &irq_domain_simple_ops, NULL);
571570
if (!eint->domain)
572571
goto err_eint;
573572

drivers/pinctrl/pinctrl-at91-pio4.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1206,7 +1206,7 @@ static int atmel_pinctrl_probe(struct platform_device *pdev)
12061206
dev_dbg(dev, "bank %i: irq=%d\n", i, ret);
12071207
}
12081208

1209-
atmel_pioctrl->irq_domain = irq_domain_add_linear(dev->of_node,
1209+
atmel_pioctrl->irq_domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node),
12101210
atmel_pioctrl->gpio_chip->ngpio,
12111211
&irq_domain_simple_ops, NULL);
12121212
if (!atmel_pioctrl->irq_domain)

drivers/pinctrl/pinctrl-single.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1611,15 +1611,16 @@ static int pcs_irq_init_chained_handler(struct pcs_device *pcs,
16111611

16121612
/*
16131613
* We can use the register offset as the hardirq
1614-
* number as irq_domain_add_simple maps them lazily.
1614+
* number as irq_domain_create_simple maps them lazily.
16151615
* This way we can easily support more than one
16161616
* interrupt per function if needed.
16171617
*/
16181618
num_irqs = pcs->size;
16191619

1620-
pcs->domain = irq_domain_add_simple(np, num_irqs, 0,
1621-
&pcs_irqdomain_ops,
1622-
pcs_soc);
1620+
pcs->domain = irq_domain_create_simple(of_fwnode_handle(np),
1621+
num_irqs, 0,
1622+
&pcs_irqdomain_ops,
1623+
pcs_soc);
16231624
if (!pcs->domain) {
16241625
irq_set_chained_handler(pcs_soc->irq, NULL);
16251626
return -EINVAL;

drivers/pinctrl/sunxi/pinctrl-sunxi.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,10 +1646,9 @@ int sunxi_pinctrl_init_with_flags(struct platform_device *pdev,
16461646
}
16471647
}
16481648

1649-
pctl->domain = irq_domain_add_linear(node,
1650-
pctl->desc->irq_banks * IRQ_PER_BANK,
1651-
&sunxi_pinctrl_irq_domain_ops,
1652-
pctl);
1649+
pctl->domain = irq_domain_create_linear(of_fwnode_handle(node),
1650+
pctl->desc->irq_banks * IRQ_PER_BANK,
1651+
&sunxi_pinctrl_irq_domain_ops, pctl);
16531652
if (!pctl->domain) {
16541653
dev_err(&pdev->dev, "Couldn't register IRQ domain\n");
16551654
ret = -ENOMEM;

0 commit comments

Comments
 (0)