summaryrefslogtreecommitdiffstats
path: root/arch/sparc/kernel
diff options
context:
space:
mode:
authorDavid S. Miller2008-08-21 01:34:39 +0200
committerDavid S. Miller2008-08-25 05:33:55 +0200
commit44266215e3c8209613cea014721015113b7cd2d9 (patch)
treec3da273c653514b55e348b8ae928545f3ca93e7a /arch/sparc/kernel
parentsparc: Add mutex for set property calls. (diff)
downloadkernel-qcow2-linux-44266215e3c8209613cea014721015113b7cd2d9.tar.gz
kernel-qcow2-linux-44266215e3c8209613cea014721015113b7cd2d9.tar.xz
kernel-qcow2-linux-44266215e3c8209613cea014721015113b7cd2d9.zip
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/sparc/kernel')
-rw-r--r--arch/sparc/kernel/of_device.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c
index cc4c235c4f59..56e9a718ef8f 100644
--- a/arch/sparc/kernel/of_device.c
+++ b/arch/sparc/kernel/of_device.c
@@ -29,6 +29,17 @@ struct of_device *of_find_device_by_node(struct device_node *dp)
}
EXPORT_SYMBOL(of_find_device_by_node);
+int irq_of_parse_and_map(struct device_node *node, int index)
+{
+ struct of_device *op = of_find_device_by_node(node);
+
+ if (!op || index >= op->num_irqs)
+ return 0xffffffff;
+
+ return op->irqs[index];
+}
+EXPORT_SYMBOL(irq_of_parse_and_map);
+
#ifdef CONFIG_PCI
struct bus_type ebus_bus_type;
EXPORT_SYMBOL(ebus_bus_type);