Commit 93174c05 authored by Jiri Slaby (SUSE)'s avatar Jiri Slaby (SUSE) Committed by Thomas Gleixner
Browse files

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: default avatarJiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250611104348.192092-10-jirislaby@kernel.org
parent 19272b37
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -372,7 +372,7 @@ static int pdc_intc_probe(struct platform_device *pdev)
	priv->syswake_irq = irq;

	/* 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);
	if (unlikely(!priv->domain)) {
		dev_err(&pdev->dev, "cannot add IRQ domain\n");
+2 −2
Original line number Diff line number Diff line
@@ -212,7 +212,7 @@ static int imx_irqsteer_probe(struct platform_device *pdev)
	/* steer all IRQs into configured channel */
	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);
	if (!data->domain) {
		dev_err(&pdev->dev, "failed to create IRQ domain\n");
+2 −2
Original line number Diff line number Diff line
@@ -157,8 +157,8 @@ static int keystone_irq_probe(struct platform_device *pdev)
	kirq->chip.irq_mask	= keystone_irq_setmask;
	kirq->chip.irq_unmask	= keystone_irq_unmask;

	kirq->irqd = irq_domain_create_linear(of_fwnode_handle(np), KEYSTONE_N_IRQ,
					      &keystone_irq_ops, kirq);
	kirq->irqd = irq_domain_create_linear(dev_fwnode(dev), KEYSTONE_N_IRQ, &keystone_irq_ops,
					      kirq);
	if (!kirq->irqd) {
		dev_err(dev, "IRQ domain registration failed\n");
		return -ENODEV;
+1 −1
Original line number Diff line number Diff line
@@ -150,7 +150,7 @@ static int mvebu_pic_probe(struct platform_device *pdev)
		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);
	if (!pic->domain) {
		dev_err(&pdev->dev, "Failed to allocate irq domain\n");
+1 −1
Original line number Diff line number Diff line
@@ -555,7 +555,7 @@ static int pruss_intc_probe(struct platform_device *pdev)

	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);
	if (!intc->domain)
		return -ENOMEM;
Loading