]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
soc: Use dev_fwnode()
authorJiri Slaby (SUSE) <jirislaby@kernel.org>
Wed, 11 Jun 2025 10:43:47 +0000 (12:43 +0200)
committerChristophe Leroy <christophe.leroy@csgroup.eu>
Tue, 8 Jul 2025 08:29:28 +0000 (10:29 +0200)
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>
Cc: Qiang Zhao <qiang.zhao@nxp.com>
Cc: Christophe Leroy <christophe.leroy@csgroup.eu>
Cc: Thierry Reding <thierry.reding@gmail.com>
Cc: Jonathan Hunter <jonathanh@nvidia.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linuxppc-dev@lists.ozlabs.org
Acked-by: Thierry Reding <treding@nvidia.com>
Link: https://lore.kernel.org/linuxppc-dev/20250611104348.192092-19-jirislaby@kernel.org/
Signed-off-by: Christophe Leroy <christophe.leroy@csgroup.eu>
drivers/soc/fsl/qe/qe_ic.c
drivers/soc/tegra/pmc.c

index 4068b501a3a38c5081b42937bd0ae7467b482dd9..943911053af68f79608f13db9b6b3bf77b91dca8 100644 (file)
@@ -407,7 +407,6 @@ static int qe_ic_init(struct platform_device *pdev)
        void (*high_handler)(struct irq_desc *desc);
        struct qe_ic *qe_ic;
        struct resource *res;
-       struct device_node *node = pdev->dev.of_node;
 
        res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
        if (res == NULL) {
@@ -441,7 +440,7 @@ static int qe_ic_init(struct platform_device *pdev)
                high_handler = NULL;
        }
 
-       qe_ic->irqhost = irq_domain_create_linear(of_fwnode_handle(node), NR_QE_IC_INTS,
+       qe_ic->irqhost = irq_domain_create_linear(dev_fwnode(&pdev->dev), NR_QE_IC_INTS,
                                                  &qe_ic_host_ops, qe_ic);
        if (qe_ic->irqhost == NULL) {
                dev_err(dev, "failed to add irq domain\n");
index e0d67bfe955cdea6b4703952741b0b9970084d66..9543bee0c3216f99a713ad2b88cd876f85ca68c3 100644 (file)
@@ -2500,8 +2500,7 @@ static int tegra_pmc_irq_init(struct tegra_pmc *pmc)
        pmc->irq.irq_set_type = pmc->soc->irq_set_type;
        pmc->irq.irq_set_wake = pmc->soc->irq_set_wake;
 
-       pmc->domain = irq_domain_create_hierarchy(parent, 0, 96,
-                                                 of_fwnode_handle(pmc->dev->of_node),
+       pmc->domain = irq_domain_create_hierarchy(parent, 0, 96, dev_fwnode(pmc->dev),
                                                  &tegra_pmc_irq_domain_ops, pmc);
        if (!pmc->domain) {
                dev_err(pmc->dev, "failed to allocate domain\n");