Skip to content

Commit f743f54

Browse files
jhovoldMarc Zyngier
authored andcommitted
irqchip/mvebu-odmi: Use irq_domain_create_hierarchy()
Use the irq_domain_create_hierarchy() helper to create the hierarchical domain, which both serves as documentation and avoids poking at irqdomain internals. Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Tested-by: Hsin-Yi Wang <[email protected]> Tested-by: Mark-PK Tsai <[email protected]> Signed-off-by: Johan Hovold <[email protected]> Signed-off-by: Marc Zyngier <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 6159c47 commit f743f54

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

drivers/irqchip/irq-mvebu-odmi.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ static struct msi_domain_info odmi_msi_domain_info = {
161161
static int __init mvebu_odmi_init(struct device_node *node,
162162
struct device_node *parent)
163163
{
164-
struct irq_domain *inner_domain, *plat_domain;
164+
struct irq_domain *parent_domain, *inner_domain, *plat_domain;
165165
int ret, i;
166166

167167
if (of_property_read_u32(node, "marvell,odmi-frames", &odmis_count))
@@ -197,16 +197,17 @@ static int __init mvebu_odmi_init(struct device_node *node,
197197
}
198198
}
199199

200-
inner_domain = irq_domain_create_linear(of_node_to_fwnode(node),
201-
odmis_count * NODMIS_PER_FRAME,
202-
&odmi_domain_ops, NULL);
200+
parent_domain = irq_find_host(parent);
201+
202+
inner_domain = irq_domain_create_hierarchy(parent_domain, 0,
203+
odmis_count * NODMIS_PER_FRAME,
204+
of_node_to_fwnode(node),
205+
&odmi_domain_ops, NULL);
203206
if (!inner_domain) {
204207
ret = -ENOMEM;
205208
goto err_unmap;
206209
}
207210

208-
inner_domain->parent = irq_find_host(parent);
209-
210211
plat_domain = platform_msi_create_irq_domain(of_node_to_fwnode(node),
211212
&odmi_msi_domain_info,
212213
inner_domain);

0 commit comments

Comments
 (0)