]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
net: Use dev_fwnode()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 11 Jun 2025 10:43:43 +0000 (12:43 +0200)
committerJakub Kicinski <kuba@kernel.org>
Fri, 13 Jun 2025 01:46:37 +0000 (18:46 -0700)
irq_domain_create_simple() takes fwnode as the first argument. It can be
extracted from the struct device using 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>
Link: https://patch.msgid.link/20250611104348.192092-15-jirislaby@kernel.org
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz_common.c
drivers/net/dsa/microchip/ksz_ptp.c
drivers/net/dsa/mv88e6xxx/global2.c
drivers/net/dsa/qca/ar9331.c
drivers/net/usb/lan78xx.c

index 7c142c17b3f69d96a7e6405d56a8aa22e931c1d2..6e1daf0018bcf950ca26ad97ff1867f652022d0c 100644 (file)
@@ -2786,8 +2786,7 @@ static int ksz_irq_common_setup(struct ksz_device *dev, struct ksz_irq *kirq)
        kirq->dev = dev;
        kirq->masked = ~0;
 
-       kirq->domain = irq_domain_create_simple(of_fwnode_handle(dev->dev->of_node),
-                                               kirq->nirqs, 0,
+       kirq->domain = irq_domain_create_simple(dev_fwnode(dev->dev), kirq->nirqs, 0,
                                                &ksz_irq_domain_ops, kirq);
        if (!kirq->domain)
                return -ENOMEM;
index 8ab664e85f133f39ddbf691ed87816b16b0d6c4c..35fc21b1ee48a47daa278573bfe8749c7b42c731 100644 (file)
@@ -1130,8 +1130,8 @@ int ksz_ptp_irq_setup(struct dsa_switch *ds, u8 p)
 
        init_completion(&port->tstamp_msg_comp);
 
-       ptpirq->domain = irq_domain_create_linear(of_fwnode_handle(dev->dev->of_node),
-                                                 ptpirq->nirqs, &ksz_ptp_irq_domain_ops, ptpirq);
+       ptpirq->domain = irq_domain_create_linear(dev_fwnode(dev->dev), ptpirq->nirqs,
+                                                 &ksz_ptp_irq_domain_ops, ptpirq);
        if (!ptpirq->domain)
                return -ENOMEM;
 
index aaf97c1e3167b1b795b4740d80ee7c58f447a182..30a6ffa7817b084d885439d3a6626cda830f358e 100644 (file)
@@ -1154,10 +1154,8 @@ int mv88e6xxx_g2_irq_setup(struct mv88e6xxx_chip *chip)
        if (err)
                return err;
 
-       chip->g2_irq.domain = irq_domain_create_simple(of_fwnode_handle(chip->dev->of_node),
-                                                      16, 0,
-                                                      &mv88e6xxx_g2_irq_domain_ops,
-                                                      chip);
+       chip->g2_irq.domain = irq_domain_create_simple(dev_fwnode(chip->dev), 16, 0,
+                                                      &mv88e6xxx_g2_irq_domain_ops, chip);
        if (!chip->g2_irq.domain)
                return -ENOMEM;
 
index 79a29676ca6f5bb0e636a10086be9ded6a68977e..0526aa96146e7ef9aea315d7f694ae5efacd85be 100644 (file)
@@ -821,8 +821,8 @@ static int ar9331_sw_irq_init(struct ar9331_sw_priv *priv)
                return ret;
        }
 
-       priv->irqdomain = irq_domain_create_linear(of_fwnode_handle(np), 1,
-                                                  &ar9331_sw_irqdomain_ops, priv);
+       priv->irqdomain = irq_domain_create_linear(dev_fwnode(dev), 1, &ar9331_sw_irqdomain_ops,
+                                                  priv);
        if (!priv->irqdomain) {
                dev_err(dev, "failed to create IRQ domain\n");
                return -EINVAL;
index 3edcf96cc7a54c26df723cd981f99083dfc2bd6a..64e2597c77cc21fe5e90db021cea662cce6ae9a4 100644 (file)
@@ -2448,10 +2448,8 @@ static int lan78xx_setup_irq_domain(struct lan78xx_net *dev)
        dev->domain_data.irqchip = &lan78xx_irqchip;
        dev->domain_data.irq_handler = handle_simple_irq;
 
-       irqdomain = irq_domain_create_simple(of_fwnode_handle(dev->udev->dev.parent->of_node),
-                                            MAX_INT_EP, 0,
-                                            &chip_domain_ops,
-                                            &dev->domain_data);
+       irqdomain = irq_domain_create_simple(dev_fwnode(dev->udev->dev.parent), MAX_INT_EP, 0,
+                                            &chip_domain_ops, &dev->domain_data);
        if (irqdomain) {
                /* create mapping for PHY interrupt */
                irqmap = irq_create_mapping(irqdomain, INT_EP_PHY);