Skip to content

Commit 6e4e30d

Browse files
Jiri Slaby (SUSE)KAGA-KOKO
authored andcommitted
soc: Switch to irq_domain_create_*()
irq_domain_add_*() interfaces are going away as being obsolete now. Switch to the preferred irq_domain_create_*() ones. Those differ in the node parameter: They take more generic struct fwnode_handle instead of struct device_node. Therefore, of_fwnode_handle() is added around the original 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: Fix up subject prefix ] Signed-off-by: Jiri Slaby (SUSE) <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Acked-by: Christophe Leroy <[email protected]> # For soc/fsl Link: https://lore.kernel.org/all/[email protected]
1 parent b625f93 commit 6e4e30d

File tree

5 files changed

+9
-8
lines changed

5 files changed

+9
-8
lines changed

drivers/soc/dove/pmu.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -274,8 +274,8 @@ static int __init dove_init_pmu_irq(struct pmu_data *pmu, int irq)
274274
writel(0, pmu->pmc_base + PMC_IRQ_MASK);
275275
writel(0, pmu->pmc_base + PMC_IRQ_CAUSE);
276276

277-
domain = irq_domain_add_linear(pmu->of_node, NR_PMU_IRQS,
278-
&irq_generic_chip_ops, NULL);
277+
domain = irq_domain_create_linear(of_fwnode_handle(pmu->of_node), NR_PMU_IRQS,
278+
&irq_generic_chip_ops, NULL);
279279
if (!domain) {
280280
pr_err("%s: unable to add irq domain\n", name);
281281
return -ENOMEM;

drivers/soc/fsl/qe/qe_ic.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,8 @@ static int qe_ic_init(struct platform_device *pdev)
446446
high_handler = NULL;
447447
}
448448

449-
qe_ic->irqhost = irq_domain_add_linear(node, NR_QE_IC_INTS,
450-
&qe_ic_host_ops, qe_ic);
449+
qe_ic->irqhost = irq_domain_create_linear(of_fwnode_handle(node), NR_QE_IC_INTS,
450+
&qe_ic_host_ops, qe_ic);
451451
if (qe_ic->irqhost == NULL) {
452452
dev_err(dev, "failed to add irq domain\n");
453453
return -ENODEV;

drivers/soc/qcom/smp2p.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -399,7 +399,7 @@ static int qcom_smp2p_inbound_entry(struct qcom_smp2p *smp2p,
399399
struct smp2p_entry *entry,
400400
struct device_node *node)
401401
{
402-
entry->domain = irq_domain_add_linear(node, 32, &smp2p_irq_ops, entry);
402+
entry->domain = irq_domain_create_linear(of_fwnode_handle(node), 32, &smp2p_irq_ops, entry);
403403
if (!entry->domain) {
404404
dev_err(smp2p->dev, "failed to add irq_domain\n");
405405
return -ENOMEM;

drivers/soc/qcom/smsm.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -456,7 +456,7 @@ static int smsm_inbound_entry(struct qcom_smsm *smsm,
456456
return ret;
457457
}
458458

459-
entry->domain = irq_domain_add_linear(node, 32, &smsm_irq_ops, entry);
459+
entry->domain = irq_domain_create_linear(of_fwnode_handle(node), 32, &smsm_irq_ops, entry);
460460
if (!entry->domain) {
461461
dev_err(smsm->dev, "failed to add irq_domain\n");
462462
return -ENOMEM;

drivers/soc/tegra/pmc.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2500,8 +2500,9 @@ static int tegra_pmc_irq_init(struct tegra_pmc *pmc)
25002500
pmc->irq.irq_set_type = pmc->soc->irq_set_type;
25012501
pmc->irq.irq_set_wake = pmc->soc->irq_set_wake;
25022502

2503-
pmc->domain = irq_domain_add_hierarchy(parent, 0, 96, pmc->dev->of_node,
2504-
&tegra_pmc_irq_domain_ops, pmc);
2503+
pmc->domain = irq_domain_create_hierarchy(parent, 0, 96,
2504+
of_fwnode_handle(pmc->dev->of_node),
2505+
&tegra_pmc_irq_domain_ops, pmc);
25052506
if (!pmc->domain) {
25062507
dev_err(pmc->dev, "failed to allocate domain\n");
25072508
return -ENOMEM;

0 commit comments

Comments
 (0)