]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
thermal: Switch to irq_domain_create_linear()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 19 Mar 2025 09:29:31 +0000 (10:29 +0100)
committerThomas Gleixner <tglx@linutronix.de>
Fri, 16 May 2025 19:06:11 +0000 (21:06 +0200)
irq_domain_add_linear() is going away as being obsolete now. Switch to
the preferred irq_domain_create_linear(). That differs in the first
parameter: It takes more generic struct fwnode_handle instead of struct
device_node. Therefore, of_fwnode_handle() is added around the
parameter.

Note some of the users can likely use dev->fwnode directly instead of
indirect of_fwnode_handle(dev->of_node). But dev->fwnode is not
guaranteed to be set for all, so this has to be investigated on case to
case basis (by people who can actually test with the HW).

[ tglx: Fixed up subject prefix ]

Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/20250319092951.37667-39-jirislaby@kernel.org
drivers/thermal/qcom/lmh.c
drivers/thermal/tegra/soctherm.c

index d2d49264cf83a4c4646202044700a7a8bf3c0b95..991d1573983d9384091a44eab4fb2345118576a4 100644 (file)
@@ -209,7 +209,8 @@ static int lmh_probe(struct platform_device *pdev)
        }
 
        lmh_data->irq = platform_get_irq(pdev, 0);
-       lmh_data->domain = irq_domain_add_linear(np, 1, &lmh_irq_ops, lmh_data);
+       lmh_data->domain = irq_domain_create_linear(of_fwnode_handle(np), 1, &lmh_irq_ops,
+                                                   lmh_data);
        if (!lmh_data->domain) {
                dev_err(dev, "Error adding irq_domain\n");
                return -EINVAL;
index 2c5ddf0db40c6e7e021d84974afbcba5d9ebbe0c..926f1052e6de04fc4d5ff78334b52ffe98cdf4ca 100644 (file)
@@ -1234,7 +1234,7 @@ static int soctherm_oc_int_init(struct device_node *np, int num_irqs)
        soc_irq_cdata.irq_chip.irq_set_type = soctherm_oc_irq_set_type;
        soc_irq_cdata.irq_chip.irq_set_wake = NULL;
 
-       soc_irq_cdata.domain = irq_domain_add_linear(np, num_irqs,
+       soc_irq_cdata.domain = irq_domain_create_linear(of_fwnode_handle(np), num_irqs,
                                                     &soctherm_oc_domain_ops,
                                                     &soc_irq_cdata);