Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irqchip: Use dev_fwnode()

irq_domain_create_simple() takes a fwnode as the first argument. It can be
extracted from struct device using the 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>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250611104348.192092-10-jirislaby@kernel.org

authored by

Jiri Slaby (SUSE) and committed by
Thomas Gleixner
93174c05 19272b37

+20 -28
+2 -2
drivers/irqchip/irq-imgpdc.c
··· 372 372 priv->syswake_irq = irq; 373 373 374 374 /* Set up an IRQ domain */ 375 - priv->domain = irq_domain_create_linear(of_fwnode_handle(node), 16, &irq_generic_chip_ops, 376 - priv); 375 + priv->domain = irq_domain_create_linear(dev_fwnode(&pdev->dev), 16, &irq_generic_chip_ops, 376 + priv); 377 377 if (unlikely(!priv->domain)) { 378 378 dev_err(&pdev->dev, "cannot add IRQ domain\n"); 379 379 return -ENOMEM;
+2 -2
drivers/irqchip/irq-imx-irqsteer.c
··· 212 212 /* steer all IRQs into configured channel */ 213 213 writel_relaxed(BIT(data->channel), data->regs + CHANCTRL); 214 214 215 - data->domain = irq_domain_create_linear(of_fwnode_handle(np), data->reg_num * 32, 216 - &imx_irqsteer_domain_ops, data); 215 + data->domain = irq_domain_create_linear(dev_fwnode(&pdev->dev), data->reg_num * 32, 216 + &imx_irqsteer_domain_ops, data); 217 217 if (!data->domain) { 218 218 dev_err(&pdev->dev, "failed to create IRQ domain\n"); 219 219 ret = -ENOMEM;
+2 -2
drivers/irqchip/irq-keystone.c
··· 157 157 kirq->chip.irq_mask = keystone_irq_setmask; 158 158 kirq->chip.irq_unmask = keystone_irq_unmask; 159 159 160 - kirq->irqd = irq_domain_create_linear(of_fwnode_handle(np), KEYSTONE_N_IRQ, 161 - &keystone_irq_ops, kirq); 160 + kirq->irqd = irq_domain_create_linear(dev_fwnode(dev), KEYSTONE_N_IRQ, &keystone_irq_ops, 161 + kirq); 162 162 if (!kirq->irqd) { 163 163 dev_err(dev, "IRQ domain registration failed\n"); 164 164 return -ENODEV;
+1 -1
drivers/irqchip/irq-mvebu-pic.c
··· 150 150 return -EINVAL; 151 151 } 152 152 153 - pic->domain = irq_domain_create_linear(of_fwnode_handle(node), PIC_MAX_IRQS, 153 + pic->domain = irq_domain_create_linear(dev_fwnode(&pdev->dev), PIC_MAX_IRQS, 154 154 &mvebu_pic_domain_ops, pic); 155 155 if (!pic->domain) { 156 156 dev_err(&pdev->dev, "Failed to allocate irq domain\n");
+1 -1
drivers/irqchip/irq-pruss-intc.c
··· 555 555 556 556 mutex_init(&intc->lock); 557 557 558 - intc->domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node), max_system_events, 558 + intc->domain = irq_domain_create_linear(dev_fwnode(dev), max_system_events, 559 559 &pruss_intc_irq_domain_ops, intc); 560 560 if (!intc->domain) 561 561 return -ENOMEM;
+2 -4
drivers/irqchip/irq-renesas-intc-irqpin.c
··· 513 513 irq_chip->irq_set_wake = intc_irqpin_irq_set_wake; 514 514 irq_chip->flags = IRQCHIP_MASK_ON_SUSPEND; 515 515 516 - p->irq_domain = irq_domain_create_simple(of_fwnode_handle(dev->of_node), 517 - nirqs, 0, 518 - &intc_irqpin_irq_domain_ops, 519 - p); 516 + p->irq_domain = irq_domain_create_simple(dev_fwnode(dev), nirqs, 0, 517 + &intc_irqpin_irq_domain_ops, p); 520 518 if (!p->irq_domain) { 521 519 ret = -ENXIO; 522 520 dev_err(dev, "cannot initialize irq domain\n");
+1 -1
drivers/irqchip/irq-renesas-irqc.c
··· 168 168 169 169 p->cpu_int_base = p->iomem + IRQC_INT_CPU_BASE(0); /* SYS-SPI */ 170 170 171 - p->irq_domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node), p->number_of_irqs, 171 + p->irq_domain = irq_domain_create_linear(dev_fwnode(dev), p->number_of_irqs, 172 172 &irq_generic_chip_ops, p); 173 173 if (!p->irq_domain) { 174 174 ret = -ENXIO;
+2 -3
drivers/irqchip/irq-renesas-rza1.c
··· 231 231 priv->chip.irq_set_type = rza1_irqc_set_type; 232 232 priv->chip.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_WAKE; 233 233 234 - priv->irq_domain = irq_domain_create_hierarchy(parent, 0, IRQC_NUM_IRQ, 235 - of_fwnode_handle(np), &rza1_irqc_domain_ops, 236 - priv); 234 + priv->irq_domain = irq_domain_create_hierarchy(parent, 0, IRQC_NUM_IRQ, dev_fwnode(dev), 235 + &rza1_irqc_domain_ops, priv); 237 236 if (!priv->irq_domain) { 238 237 dev_err(dev, "cannot initialize irq domain\n"); 239 238 ret = -ENOMEM;
+2 -3
drivers/irqchip/irq-renesas-rzg2l.c
··· 574 574 575 575 raw_spin_lock_init(&rzg2l_irqc_data->lock); 576 576 577 - irq_domain = irq_domain_create_hierarchy(parent_domain, 0, IRQC_NUM_IRQ, 578 - of_fwnode_handle(node), &rzg2l_irqc_domain_ops, 579 - rzg2l_irqc_data); 577 + irq_domain = irq_domain_create_hierarchy(parent_domain, 0, IRQC_NUM_IRQ, dev_fwnode(dev), 578 + &rzg2l_irqc_domain_ops, rzg2l_irqc_data); 580 579 if (!irq_domain) { 581 580 pm_runtime_put(dev); 582 581 return dev_err_probe(dev, -ENOMEM, "failed to add irq domain\n");
+1 -1
drivers/irqchip/irq-renesas-rzv2h.c
··· 558 558 raw_spin_lock_init(&rzv2h_icu_data->lock); 559 559 560 560 irq_domain = irq_domain_create_hierarchy(parent_domain, 0, ICU_NUM_IRQ, 561 - of_fwnode_handle(node), &rzv2h_icu_domain_ops, 561 + dev_fwnode(&pdev->dev), &rzv2h_icu_domain_ops, 562 562 rzv2h_icu_data); 563 563 if (!irq_domain) { 564 564 dev_err(&pdev->dev, "failed to add irq domain\n");
+1 -3
drivers/irqchip/irq-stm32mp-exti.c
··· 683 683 } 684 684 685 685 domain = irq_domain_create_hierarchy(parent_domain, 0, drv_data->bank_nr * IRQS_PER_BANK, 686 - of_fwnode_handle(np), &stm32mp_exti_domain_ops, 687 - host_data); 688 - 686 + dev_fwnode(dev), &stm32mp_exti_domain_ops, host_data); 689 687 if (!domain) { 690 688 dev_err(dev, "Could not register exti domain\n"); 691 689 return -ENOMEM;
+1 -2
drivers/irqchip/irq-ti-sci-inta.c
··· 701 701 if (ret) 702 702 return ret; 703 703 704 - domain = irq_domain_create_linear(of_fwnode_handle(dev_of_node(dev)), 705 - ti_sci_get_num_resources(inta->vint), 704 + domain = irq_domain_create_linear(dev_fwnode(dev), ti_sci_get_num_resources(inta->vint), 706 705 &ti_sci_inta_irq_domain_ops, inta); 707 706 if (!domain) { 708 707 dev_err(dev, "Failed to allocate IRQ domain\n");
+1 -2
drivers/irqchip/irq-ti-sci-intr.c
··· 274 274 return PTR_ERR(intr->out_irqs); 275 275 } 276 276 277 - domain = irq_domain_create_hierarchy(parent_domain, 0, 0, 278 - of_fwnode_handle(dev_of_node(dev)), 277 + domain = irq_domain_create_hierarchy(parent_domain, 0, 0, dev_fwnode(dev), 279 278 &ti_sci_intr_irq_domain_ops, intr); 280 279 if (!domain) { 281 280 dev_err(dev, "Failed to allocate IRQ domain\n");
+1 -1
drivers/irqchip/irq-ts4800.c
··· 125 125 return -EINVAL; 126 126 } 127 127 128 - data->domain = irq_domain_create_linear(of_fwnode_handle(node), 8, &ts4800_ic_ops, data); 128 + data->domain = irq_domain_create_linear(dev_fwnode(&pdev->dev), 8, &ts4800_ic_ops, data); 129 129 if (!data->domain) { 130 130 dev_err(&pdev->dev, "cannot add IRQ domain\n"); 131 131 return -ENOMEM;