diff options
author | Marc Zyngier <marc.zyngier@arm.com> | 2015-10-13 07:51:30 -0400 |
---|---|---|
committer | Thomas Gleixner <tglx@linutronix.de> | 2015-10-13 13:01:23 -0400 |
commit | f110711a6053f08731858aa91420104094188973 (patch) | |
tree | db68da1611ef83a61c876496b564a57ab98347c2 /kernel/irq | |
parent | 5d4c9bc7767bc86eb9a0e66df783e3fbada7dc97 (diff) |
irqdomain: Convert irqdomain-%3Eof_node to fwnode
Now that we have everyone accessing the of_node field via the
irq_domain_get_of_node accessor, it is pretty easy to swap it
for a pointer to a fwnode_handle.
This translates into a few limited changes in __irq_domain_add,
and an updated irq_domain_get_of_node.
Signed-off-by: Marc Zyngier <marc.zyngier@arm.com>
Reviewed-and-tested-by: Hanjun Guo <hanjun.guo@linaro.org>
Tested-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
Cc: <linux-arm-kernel@lists.infradead.org>
Cc: Tomasz Nowicki <tomasz.nowicki@linaro.org>
Cc: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com>
Cc: Graeme Gregory <graeme@xora.org.uk>
Cc: Jake Oshins <jakeo@microsoft.com>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Rafael J. Wysocki <rjw@rjwysocki.net>
Link: http://lkml.kernel.org/r/1444737105-31573-3-git-send-email-marc.zyngier@arm.com
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/irqdomain.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/kernel/irq/irqdomain.c b/kernel/irq/irqdomain.c index 8f8b538b067d..1aee5c118bae 100644 --- a/kernel/irq/irqdomain.c +++ b/kernel/irq/irqdomain.c | |||
@@ -46,17 +46,21 @@ struct irq_domain *__irq_domain_add(struct device_node *of_node, int size, | |||
46 | void *host_data) | 46 | void *host_data) |
47 | { | 47 | { |
48 | struct irq_domain *domain; | 48 | struct irq_domain *domain; |
49 | struct fwnode_handle *fwnode; | ||
49 | 50 | ||
50 | domain = kzalloc_node(sizeof(*domain) + (sizeof(unsigned int) * size), | 51 | domain = kzalloc_node(sizeof(*domain) + (sizeof(unsigned int) * size), |
51 | GFP_KERNEL, of_node_to_nid(of_node)); | 52 | GFP_KERNEL, of_node_to_nid(of_node)); |
52 | if (WARN_ON(!domain)) | 53 | if (WARN_ON(!domain)) |
53 | return NULL; | 54 | return NULL; |
54 | 55 | ||
56 | of_node_get(of_node); | ||
57 | fwnode = of_node ? &of_node->fwnode : NULL; | ||
58 | |||
55 | /* Fill structure */ | 59 | /* Fill structure */ |
56 | INIT_RADIX_TREE(&domain->revmap_tree, GFP_KERNEL); | 60 | INIT_RADIX_TREE(&domain->revmap_tree, GFP_KERNEL); |
57 | domain->ops = ops; | 61 | domain->ops = ops; |
58 | domain->host_data = host_data; | 62 | domain->host_data = host_data; |
59 | domain->of_node = of_node_get(of_node); | 63 | domain->fwnode = fwnode; |
60 | domain->hwirq_max = hwirq_max; | 64 | domain->hwirq_max = hwirq_max; |
61 | domain->revmap_size = size; | 65 | domain->revmap_size = size; |
62 | domain->revmap_direct_max_irq = direct_max; | 66 | domain->revmap_direct_max_irq = direct_max; |