diff options
author | David S. Miller <davem@davemloft.net> | 2008-08-20 19:34:39 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-08-24 23:33:55 -0400 |
commit | 44266215e3c8209613cea014721015113b7cd2d9 (patch) | |
tree | c3da273c653514b55e348b8ae928545f3ca93e7a /arch/sparc64/kernel/of_device.c | |
parent | 2481d76615d5e15340ccfb0243fe8779766dfc6e (diff) |
sparc: Implement irq_of_parse_and_map() and irq_dispose_mapping().
This allows more OF layer code to be shared between powerpc and
sparc.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc64/kernel/of_device.c')
-rw-r--r-- | arch/sparc64/kernel/of_device.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c index f8b50cbf4bf7..8a0d82343a25 100644 --- a/arch/sparc64/kernel/of_device.c +++ b/arch/sparc64/kernel/of_device.c | |||
@@ -55,6 +55,17 @@ struct of_device *of_find_device_by_node(struct device_node *dp) | |||
55 | } | 55 | } |
56 | EXPORT_SYMBOL(of_find_device_by_node); | 56 | EXPORT_SYMBOL(of_find_device_by_node); |
57 | 57 | ||
58 | int irq_of_parse_and_map(struct device_node *node, int index) | ||
59 | { | ||
60 | struct of_device *op = of_find_device_by_node(node); | ||
61 | |||
62 | if (!op || index >= op->num_irqs) | ||
63 | return 0xffffffff; | ||
64 | |||
65 | return op->irqs[index]; | ||
66 | } | ||
67 | EXPORT_SYMBOL(irq_of_parse_and_map); | ||
68 | |||
58 | #ifdef CONFIG_PCI | 69 | #ifdef CONFIG_PCI |
59 | struct bus_type ebus_bus_type; | 70 | struct bus_type ebus_bus_type; |
60 | EXPORT_SYMBOL(ebus_bus_type); | 71 | EXPORT_SYMBOL(ebus_bus_type); |