Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

powerpc: Use dev_fwnode()

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>
Acked-by: Christophe Leroy <christophe.leroy@csgroup.eu>
Link: https://lore.kernel.org/all/4bc0e1ca-a523-424a-8759-59e353317fba@kernel.org/
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/20250723062842.1831271-1-jirislaby@kernel.org

authored by

Jiri Slaby (SUSE) and committed by
Madhavan Srinivasan
b018bb26 02c1b082

+3 -5
+1 -2
arch/powerpc/platforms/8xx/cpm1-ic.c
··· 110 110 111 111 out_be32(&data->reg->cpic_cimr, 0); 112 112 113 - data->host = irq_domain_create_linear(of_fwnode_handle(dev->of_node), 114 - 64, &cpm_pic_host_ops, data); 113 + data->host = irq_domain_create_linear(dev_fwnode(dev), 64, &cpm_pic_host_ops, data); 115 114 if (!data->host) 116 115 return -ENODEV; 117 116
+2 -3
arch/powerpc/sysdev/fsl_msi.c
··· 412 412 } 413 413 platform_set_drvdata(dev, msi); 414 414 415 - msi->irqhost = irq_domain_create_linear(of_fwnode_handle(dev->dev.of_node), 416 - NR_MSI_IRQS_MAX, &fsl_msi_host_ops, msi); 417 - 415 + msi->irqhost = irq_domain_create_linear(dev_fwnode(&dev->dev), NR_MSI_IRQS_MAX, 416 + &fsl_msi_host_ops, msi); 418 417 if (msi->irqhost == NULL) { 419 418 dev_err(&dev->dev, "No memory for MSI irqhost\n"); 420 419 err = -ENOMEM;