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
This commit is contained in:
parent
19272b37aa
commit
93174c05dd
|
|
@ -372,8 +372,8 @@ static int pdc_intc_probe(struct platform_device *pdev)
|
||||||
priv->syswake_irq = irq;
|
priv->syswake_irq = irq;
|
||||||
|
|
||||||
/* Set up an IRQ domain */
|
/* Set up an IRQ domain */
|
||||||
priv->domain = irq_domain_create_linear(of_fwnode_handle(node), 16, &irq_generic_chip_ops,
|
priv->domain = irq_domain_create_linear(dev_fwnode(&pdev->dev), 16, &irq_generic_chip_ops,
|
||||||
priv);
|
priv);
|
||||||
if (unlikely(!priv->domain)) {
|
if (unlikely(!priv->domain)) {
|
||||||
dev_err(&pdev->dev, "cannot add IRQ domain\n");
|
dev_err(&pdev->dev, "cannot add IRQ domain\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
||||||
|
|
@ -212,8 +212,8 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
|
||||||
/* steer all IRQs into configured channel */
|
/* steer all IRQs into configured channel */
|
||||||
writel_relaxed(BIT(data->channel), data->regs + CHANCTRL);
|
writel_relaxed(BIT(data->channel), data->regs + CHANCTRL);
|
||||||
|
|
||||||
data->domain = irq_domain_create_linear(of_fwnode_handle(np), data->reg_num * 32,
|
data->domain = irq_domain_create_linear(dev_fwnode(&pdev->dev), data->reg_num * 32,
|
||||||
&imx_irqsteer_domain_ops, data);
|
&imx_irqsteer_domain_ops, data);
|
||||||
if (!data->domain) {
|
if (!data->domain) {
|
||||||
dev_err(&pdev->dev, "failed to create IRQ domain\n");
|
dev_err(&pdev->dev, "failed to create IRQ domain\n");
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
|
|
||||||
|
|
@ -157,8 +157,8 @@ static int keystone_irq_probe(struct platform_device *pdev)
|
||||||
kirq->chip.irq_mask = keystone_irq_setmask;
|
kirq->chip.irq_mask = keystone_irq_setmask;
|
||||||
kirq->chip.irq_unmask = keystone_irq_unmask;
|
kirq->chip.irq_unmask = keystone_irq_unmask;
|
||||||
|
|
||||||
kirq->irqd = irq_domain_create_linear(of_fwnode_handle(np), KEYSTONE_N_IRQ,
|
kirq->irqd = irq_domain_create_linear(dev_fwnode(dev), KEYSTONE_N_IRQ, &keystone_irq_ops,
|
||||||
&keystone_irq_ops, kirq);
|
kirq);
|
||||||
if (!kirq->irqd) {
|
if (!kirq->irqd) {
|
||||||
dev_err(dev, "IRQ domain registration failed\n");
|
dev_err(dev, "IRQ domain registration failed\n");
|
||||||
return -ENODEV;
|
return -ENODEV;
|
||||||
|
|
|
||||||
|
|
@ -150,7 +150,7 @@ static int mvebu_pic_probe(struct platform_device *pdev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
pic->domain = irq_domain_create_linear(of_fwnode_handle(node), PIC_MAX_IRQS,
|
pic->domain = irq_domain_create_linear(dev_fwnode(&pdev->dev), PIC_MAX_IRQS,
|
||||||
&mvebu_pic_domain_ops, pic);
|
&mvebu_pic_domain_ops, pic);
|
||||||
if (!pic->domain) {
|
if (!pic->domain) {
|
||||||
dev_err(&pdev->dev, "Failed to allocate irq domain\n");
|
dev_err(&pdev->dev, "Failed to allocate irq domain\n");
|
||||||
|
|
|
||||||
|
|
@ -555,7 +555,7 @@ static int pruss_intc_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
mutex_init(&intc->lock);
|
mutex_init(&intc->lock);
|
||||||
|
|
||||||
intc->domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node), max_system_events,
|
intc->domain = irq_domain_create_linear(dev_fwnode(dev), max_system_events,
|
||||||
&pruss_intc_irq_domain_ops, intc);
|
&pruss_intc_irq_domain_ops, intc);
|
||||||
if (!intc->domain)
|
if (!intc->domain)
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
||||||
|
|
@ -513,10 +513,8 @@ static int intc_irqpin_probe(struct platform_device *pdev)
|
||||||
irq_chip->irq_set_wake = intc_irqpin_irq_set_wake;
|
irq_chip->irq_set_wake = intc_irqpin_irq_set_wake;
|
||||||
irq_chip->flags = IRQCHIP_MASK_ON_SUSPEND;
|
irq_chip->flags = IRQCHIP_MASK_ON_SUSPEND;
|
||||||
|
|
||||||
p->irq_domain = irq_domain_create_simple(of_fwnode_handle(dev->of_node),
|
p->irq_domain = irq_domain_create_simple(dev_fwnode(dev), nirqs, 0,
|
||||||
nirqs, 0,
|
&intc_irqpin_irq_domain_ops, p);
|
||||||
&intc_irqpin_irq_domain_ops,
|
|
||||||
p);
|
|
||||||
if (!p->irq_domain) {
|
if (!p->irq_domain) {
|
||||||
ret = -ENXIO;
|
ret = -ENXIO;
|
||||||
dev_err(dev, "cannot initialize irq domain\n");
|
dev_err(dev, "cannot initialize irq domain\n");
|
||||||
|
|
|
||||||
|
|
@ -168,7 +168,7 @@ static int irqc_probe(struct platform_device *pdev)
|
||||||
|
|
||||||
p->cpu_int_base = p->iomem + IRQC_INT_CPU_BASE(0); /* SYS-SPI */
|
p->cpu_int_base = p->iomem + IRQC_INT_CPU_BASE(0); /* SYS-SPI */
|
||||||
|
|
||||||
p->irq_domain = irq_domain_create_linear(of_fwnode_handle(dev->of_node), p->number_of_irqs,
|
p->irq_domain = irq_domain_create_linear(dev_fwnode(dev), p->number_of_irqs,
|
||||||
&irq_generic_chip_ops, p);
|
&irq_generic_chip_ops, p);
|
||||||
if (!p->irq_domain) {
|
if (!p->irq_domain) {
|
||||||
ret = -ENXIO;
|
ret = -ENXIO;
|
||||||
|
|
|
||||||
|
|
@ -231,9 +231,8 @@ static int rza1_irqc_probe(struct platform_device *pdev)
|
||||||
priv->chip.irq_set_type = rza1_irqc_set_type;
|
priv->chip.irq_set_type = rza1_irqc_set_type;
|
||||||
priv->chip.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_WAKE;
|
priv->chip.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_WAKE;
|
||||||
|
|
||||||
priv->irq_domain = irq_domain_create_hierarchy(parent, 0, IRQC_NUM_IRQ,
|
priv->irq_domain = irq_domain_create_hierarchy(parent, 0, IRQC_NUM_IRQ, dev_fwnode(dev),
|
||||||
of_fwnode_handle(np), &rza1_irqc_domain_ops,
|
&rza1_irqc_domain_ops, priv);
|
||||||
priv);
|
|
||||||
if (!priv->irq_domain) {
|
if (!priv->irq_domain) {
|
||||||
dev_err(dev, "cannot initialize irq domain\n");
|
dev_err(dev, "cannot initialize irq domain\n");
|
||||||
ret = -ENOMEM;
|
ret = -ENOMEM;
|
||||||
|
|
|
||||||
|
|
@ -574,9 +574,8 @@ static int rzg2l_irqc_common_init(struct device_node *node, struct device_node *
|
||||||
|
|
||||||
raw_spin_lock_init(&rzg2l_irqc_data->lock);
|
raw_spin_lock_init(&rzg2l_irqc_data->lock);
|
||||||
|
|
||||||
irq_domain = irq_domain_create_hierarchy(parent_domain, 0, IRQC_NUM_IRQ,
|
irq_domain = irq_domain_create_hierarchy(parent_domain, 0, IRQC_NUM_IRQ, dev_fwnode(dev),
|
||||||
of_fwnode_handle(node), &rzg2l_irqc_domain_ops,
|
&rzg2l_irqc_domain_ops, rzg2l_irqc_data);
|
||||||
rzg2l_irqc_data);
|
|
||||||
if (!irq_domain) {
|
if (!irq_domain) {
|
||||||
pm_runtime_put(dev);
|
pm_runtime_put(dev);
|
||||||
return dev_err_probe(dev, -ENOMEM, "failed to add irq domain\n");
|
return dev_err_probe(dev, -ENOMEM, "failed to add irq domain\n");
|
||||||
|
|
|
||||||
|
|
@ -558,7 +558,7 @@ static int rzv2h_icu_init_common(struct device_node *node, struct device_node *p
|
||||||
raw_spin_lock_init(&rzv2h_icu_data->lock);
|
raw_spin_lock_init(&rzv2h_icu_data->lock);
|
||||||
|
|
||||||
irq_domain = irq_domain_create_hierarchy(parent_domain, 0, ICU_NUM_IRQ,
|
irq_domain = irq_domain_create_hierarchy(parent_domain, 0, ICU_NUM_IRQ,
|
||||||
of_fwnode_handle(node), &rzv2h_icu_domain_ops,
|
dev_fwnode(&pdev->dev), &rzv2h_icu_domain_ops,
|
||||||
rzv2h_icu_data);
|
rzv2h_icu_data);
|
||||||
if (!irq_domain) {
|
if (!irq_domain) {
|
||||||
dev_err(&pdev->dev, "failed to add irq domain\n");
|
dev_err(&pdev->dev, "failed to add irq domain\n");
|
||||||
|
|
|
||||||
|
|
@ -683,9 +683,7 @@ static int stm32mp_exti_probe(struct platform_device *pdev)
|
||||||
}
|
}
|
||||||
|
|
||||||
domain = irq_domain_create_hierarchy(parent_domain, 0, drv_data->bank_nr * IRQS_PER_BANK,
|
domain = irq_domain_create_hierarchy(parent_domain, 0, drv_data->bank_nr * IRQS_PER_BANK,
|
||||||
of_fwnode_handle(np), &stm32mp_exti_domain_ops,
|
dev_fwnode(dev), &stm32mp_exti_domain_ops, host_data);
|
||||||
host_data);
|
|
||||||
|
|
||||||
if (!domain) {
|
if (!domain) {
|
||||||
dev_err(dev, "Could not register exti domain\n");
|
dev_err(dev, "Could not register exti domain\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
||||||
|
|
@ -701,8 +701,7 @@ static int ti_sci_inta_irq_domain_probe(struct platform_device *pdev)
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
domain = irq_domain_create_linear(of_fwnode_handle(dev_of_node(dev)),
|
domain = irq_domain_create_linear(dev_fwnode(dev), ti_sci_get_num_resources(inta->vint),
|
||||||
ti_sci_get_num_resources(inta->vint),
|
|
||||||
&ti_sci_inta_irq_domain_ops, inta);
|
&ti_sci_inta_irq_domain_ops, inta);
|
||||||
if (!domain) {
|
if (!domain) {
|
||||||
dev_err(dev, "Failed to allocate IRQ domain\n");
|
dev_err(dev, "Failed to allocate IRQ domain\n");
|
||||||
|
|
|
||||||
|
|
@ -274,8 +274,7 @@ static int ti_sci_intr_irq_domain_probe(struct platform_device *pdev)
|
||||||
return PTR_ERR(intr->out_irqs);
|
return PTR_ERR(intr->out_irqs);
|
||||||
}
|
}
|
||||||
|
|
||||||
domain = irq_domain_create_hierarchy(parent_domain, 0, 0,
|
domain = irq_domain_create_hierarchy(parent_domain, 0, 0, dev_fwnode(dev),
|
||||||
of_fwnode_handle(dev_of_node(dev)),
|
|
||||||
&ti_sci_intr_irq_domain_ops, intr);
|
&ti_sci_intr_irq_domain_ops, intr);
|
||||||
if (!domain) {
|
if (!domain) {
|
||||||
dev_err(dev, "Failed to allocate IRQ domain\n");
|
dev_err(dev, "Failed to allocate IRQ domain\n");
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@ static int ts4800_ic_probe(struct platform_device *pdev)
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
||||||
data->domain = irq_domain_create_linear(of_fwnode_handle(node), 8, &ts4800_ic_ops, data);
|
data->domain = irq_domain_create_linear(dev_fwnode(&pdev->dev), 8, &ts4800_ic_ops, data);
|
||||||
if (!data->domain) {
|
if (!data->domain) {
|
||||||
dev_err(&pdev->dev, "cannot add IRQ domain\n");
|
dev_err(&pdev->dev, "cannot add IRQ domain\n");
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue