]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
irqchip: Use dev_fwnode()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 11 Jun 2025 10:43:38 +0000 (12:43 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 12 Jun 2025 13:08:12 +0000 (15:08 +0200)
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
14 files changed:
drivers/irqchip/irq-imgpdc.c
drivers/irqchip/irq-imx-irqsteer.c
drivers/irqchip/irq-keystone.c
drivers/irqchip/irq-mvebu-pic.c
drivers/irqchip/irq-pruss-intc.c
drivers/irqchip/irq-renesas-intc-irqpin.c
drivers/irqchip/irq-renesas-irqc.c
drivers/irqchip/irq-renesas-rza1.c
drivers/irqchip/irq-renesas-rzg2l.c
drivers/irqchip/irq-renesas-rzv2h.c
drivers/irqchip/irq-stm32mp-exti.c
drivers/irqchip/irq-ti-sci-inta.c
drivers/irqchip/irq-ti-sci-intr.c
drivers/irqchip/irq-ts4800.c

index f0410d5d7315d82eea7ab083b02e28baba1039cb..e9ef2f5a7207ee0ee7c81082a10d0b71af2d32ff 100644 (file)
@@ -372,8 +372,8 @@ 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);
+       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");
                return -ENOMEM;
index 6dc9ac48fee555fd501f9e272ea499fd40c18678..4682ce5bf8d3c7a41bfb3427ad8a4f531563b46f 100644 (file)
@@ -212,8 +212,8 @@ 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,
-                                            &imx_irqsteer_domain_ops, data);
+       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");
                ret = -ENOMEM;
index c9e902b7bf488b932533b6ee0475faa0900bdecf..922fff09354f962cec8aa7aba1d8a8c17f50ba68 100644 (file)
@@ -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;
index 8db638aa21d24ec10993b9e86d00f12184a47375..cd8b73482b9f5d30c3b7082797cd334f04ef551d 100644 (file)
@@ -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");
index 87a5813fd8359d81d08c50e0102e7e790031867d..81078d56f38dc5c30c06e2aa575a58d53a8047f2 100644 (file)
@@ -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;
index 0959ed43b1a9a87d24d1f494003f18a4c5a87235..117b74b635ea8b76bf106556fa23769944050157 100644 (file)
@@ -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->flags = IRQCHIP_MASK_ON_SUSPEND;
 
-       p->irq_domain = irq_domain_create_simple(of_fwnode_handle(dev->of_node),
-                                                nirqs, 0,
-                                                &intc_irqpin_irq_domain_ops,
-                                                p);
+       p->irq_domain = irq_domain_create_simple(dev_fwnode(dev), nirqs, 0,
+                                                &intc_irqpin_irq_domain_ops, p);
        if (!p->irq_domain) {
                ret = -ENXIO;
                dev_err(dev, "cannot initialize irq domain\n");
index 5c3196e5a4374480269870e3f68f6afc17db1537..b46bbb66c2641ab4466ffd92350aac261dbe72a9 100644 (file)
@@ -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->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);
        if (!p->irq_domain) {
                ret = -ENXIO;
index 0a9640ba0adb41637d2862537b79569ba2671e55..a697eb55ac90e4ce2bdb236cc68a97e5afa2cd0a 100644 (file)
@@ -231,9 +231,8 @@ static int rza1_irqc_probe(struct platform_device *pdev)
        priv->chip.irq_set_type = rza1_irqc_set_type;
        priv->chip.flags = IRQCHIP_MASK_ON_SUSPEND | IRQCHIP_SKIP_SET_WAKE;
 
-       priv->irq_domain = irq_domain_create_hierarchy(parent, 0, IRQC_NUM_IRQ,
-                                                      of_fwnode_handle(np), &rza1_irqc_domain_ops,
-                                                      priv);
+       priv->irq_domain = irq_domain_create_hierarchy(parent, 0, IRQC_NUM_IRQ, dev_fwnode(dev),
+                                                      &rza1_irqc_domain_ops, priv);
        if (!priv->irq_domain) {
                dev_err(dev, "cannot initialize irq domain\n");
                ret = -ENOMEM;
index 1e861bd64f970d07500672a399375609cdb436d5..360d88687e4f583ecb6d3a1438b61e7f7e078234 100644 (file)
@@ -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);
 
-       irq_domain = irq_domain_create_hierarchy(parent_domain, 0, IRQC_NUM_IRQ,
-                                                of_fwnode_handle(node), &rzg2l_irqc_domain_ops,
-                                                rzg2l_irqc_data);
+       irq_domain = irq_domain_create_hierarchy(parent_domain, 0, IRQC_NUM_IRQ, dev_fwnode(dev),
+                                                &rzg2l_irqc_domain_ops, rzg2l_irqc_data);
        if (!irq_domain) {
                pm_runtime_put(dev);
                return dev_err_probe(dev, -ENOMEM, "failed to add irq domain\n");
index 69b32c19e8ff686de01f4ed76392fae46e280edc..57c5a3c008c91efd7589252a7c25eb649262f867 100644 (file)
@@ -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);
 
        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);
        if (!irq_domain) {
                dev_err(&pdev->dev, "failed to add irq domain\n");
index c6b4407d05f9fe013e67f122866e0c28179631d9..a24f4f1a4f8fda182523c72793345b43799aca83 100644 (file)
@@ -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,
-                                            of_fwnode_handle(np), &stm32mp_exti_domain_ops,
-                                            host_data);
-
+                                            dev_fwnode(dev), &stm32mp_exti_domain_ops, host_data);
        if (!domain) {
                dev_err(dev, "Could not register exti domain\n");
                return -ENOMEM;
index 7de59238e6b0b8190d852b6c46f857444a45b891..01963d36cfaf3ddac1d1c56e17eb48e459128c7b 100644 (file)
@@ -701,8 +701,7 @@ static int ti_sci_inta_irq_domain_probe(struct platform_device *pdev)
        if (ret)
                return ret;
 
-       domain = irq_domain_create_linear(of_fwnode_handle(dev_of_node(dev)),
-                                         ti_sci_get_num_resources(inta->vint),
+       domain = irq_domain_create_linear(dev_fwnode(dev), ti_sci_get_num_resources(inta->vint),
                                          &ti_sci_inta_irq_domain_ops, inta);
        if (!domain) {
                dev_err(dev, "Failed to allocate IRQ domain\n");
index 07fff5ae5ce09c4faecdee75579f11c9aba1fc00..354613e74ad0bf424e714859d98ee36e10605f8b 100644 (file)
@@ -274,8 +274,7 @@ static int ti_sci_intr_irq_domain_probe(struct platform_device *pdev)
                return PTR_ERR(intr->out_irqs);
        }
 
-       domain = irq_domain_create_hierarchy(parent_domain, 0, 0,
-                                            of_fwnode_handle(dev_of_node(dev)),
+       domain = irq_domain_create_hierarchy(parent_domain, 0, 0, dev_fwnode(dev),
                                             &ti_sci_intr_irq_domain_ops, intr);
        if (!domain) {
                dev_err(dev, "Failed to allocate IRQ domain\n");
index e625f4fb2bb85347aefb05b2a85f7c64a55c2893..1e236d5b75162c62dbb4d88ec20bdfc464d6e22b 100644 (file)
@@ -125,7 +125,7 @@ static int ts4800_ic_probe(struct platform_device *pdev)
                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) {
                dev_err(&pdev->dev, "cannot add IRQ domain\n");
                return -ENOMEM;