diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index 58b85fa56066c5f1cd4aeff7f0a5c67612c175fb..900d44714f8dd8525776a17cdd4e40e2d2bf7a3e 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -101,8 +101,10 @@ static inline void of_node_put(struct device_node *node)
  * register them in the of_device objects, whereas powerpc computes them
  * on request.
  */
-extern int irq_of_parse_and_map(struct device_node *node, int index);
-#define irq_dispose_mapping(irq) do { } while (0)
+extern unsigned int irq_of_parse_and_map(struct device_node *node, int index);
+static inline void irq_dispose_mapping(unsigned int virq)
+{
+}
 
 /*
  * NB:  This is here while we transition from using asm/prom.h
diff --git a/arch/sparc/kernel/of_device.c b/arch/sparc/kernel/of_device.c
index 56e9a718ef8f4f56929f820c50e984522a16646b..aace71f7d6e59aaafdae9b8c29f582411c79995c 100644
--- a/arch/sparc/kernel/of_device.c
+++ b/arch/sparc/kernel/of_device.c
@@ -29,12 +29,12 @@ 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)
+unsigned 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 0;
 
 	return op->irqs[index];
 }
diff --git a/arch/sparc64/kernel/of_device.c b/arch/sparc64/kernel/of_device.c
index 8a0d82343a257b6783b6bd718ee745d3d95815cf..a30f2af0bf2cf8f47c3657991af9a6fed8afdcf2 100644
--- a/arch/sparc64/kernel/of_device.c
+++ b/arch/sparc64/kernel/of_device.c
@@ -55,12 +55,12 @@ 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)
+unsigned 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 0;
 
 	return op->irqs[index];
 }