powerpc: Use dev_fwnode()
Subsystems (2)
PATCH 1/1 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.
--- arch/powerpc/platforms/8xx/cpm1-ic.c | 3 +-- arch/powerpc/sysdev/fsl_msi.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-)
arch/powerpc/platforms/8xx/cpm1-ic.c +1 -2
@@ -110,8 +110,7 @@ static int cpm_pic_probe(struct platform_device *pdev)out_be32 (&data->reg->cpic_cimr,0 ); - data->host =irq_domain_create_linear (of_fwnode_handle (dev->of_node), -64 , &cpm_pic_host_ops, data); + data->host =irq_domain_create_linear (dev_fwnode (dev),64 , &cpm_pic_host_ops, data);if (!data->host)return -ENODEV ;
arch/powerpc/sysdev/fsl_msi.c +2 -3
@@ -412,9 +412,8 @@ static int fsl_of_msi_probe(struct platform_device *dev) }platform_set_drvdata (dev, msi); - msi->irqhost =irq_domain_create_linear (of_fwnode_handle (dev->dev.of_node), -NR_MSI_IRQS_MAX , &fsl_msi_host_ops, msi); - + msi->irqhost =irq_domain_create_linear (dev_fwnode (&dev->dev),NR_MSI_IRQS_MAX , + &fsl_msi_host_ops, msi);if (msi->irqhost ==NULL ) {dev_err (&dev->dev,"No memory for MSI irqhost\n" ); err = -ENOMEM ;
Signature · 1 line
2.50.1
Le 23/07/2025 à 08:28, Jiri Slaby (SUSE) a écrit :
Quoted 14 lines
irq_domain_create_simple()takes fwnode as the first argument. It can be extracted from the struct device usingdev_fwnode()helper instead of usingof_nodewithof_fwnode_handle().So use the
dev_fwnode()helper.Signed-off-by Jiri Slaby (SUSE) <[email protected]>Cc Christophe Leroy <[email protected]>Cc Madhavan Srinivasan <[email protected]>Cc Michael Ellerman <[email protected]>Cc Nicholas Piggin <[email protected]>Cc Naveen N Rao <[email protected]>
Quoted 2 lines
--- arch/powerpc/platforms/8xx/cpm1-ic.c | 3 +--
For the 8xx:
Quoted 33 lines
arch/powerpc/sysdev/fsl_msi.c | 5 ++--- 2 files changed, 3 insertions(+), 5 deletions(-)arch/powerpc/platforms/8xx/cpm1-ic.c +1
-2@@ -110,8 +110,7 @@ static int cpm_pic_probe(struct platform_device *pdev)out_be32 (&data->reg->cpic_cimr,0 ); - data->host =irq_domain_create_linear (of_fwnode_handle (dev->of_node), -64 , &cpm_pic_host_ops, data); + data->host =irq_domain_create_linear (dev_fwnode (dev),64 , &cpm_pic_host_ops, data);if (!data->host)return -ENODEV ;arch/powerpc/sysdev/fsl_msi.c +2
-3@@ -412,9 +412,8 @@ static int fsl_of_msi_probe(struct platform_device *dev) }platform_set_drvdata (dev, msi); - msi->irqhost =irq_domain_create_linear (of_fwnode_handle (dev->dev.of_node), -NR_MSI_IRQS_MAX , &fsl_msi_host_ops, msi); - + msi->irqhost =irq_domain_create_linear (dev_fwnode (&dev->dev),NR_MSI_IRQS_MAX , + &fsl_msi_host_ops, msi);if (msi->irqhost ==NULL ) {dev_err (&dev->dev,"No memory for MSI irqhost\n" ); err = -ENOMEM ;
Quoted 8 lines · Jiri Slaby (SUSE)
irq_domain_create_simple()takes fwnode as the first argument. It can be extracted from the struct device usingdev_fwnode()helper instead of usingof_nodewithof_fwnode_handle().So use the
dev_fwnode()helper.[...]
Applied to powerpc/fixes.
[1/1] powerpc: Use dev_fwnode()
https://git.kernel.org/powerpc/c/b018bb26c42049e05d3d65b057cc1250d17d9b0a
Thanks