aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorAndreas Larsson <andreas@gaisler.com>2012-11-23 06:24:09 -0500
committerGrant Likely <grant.likely@secretlab.ca>2012-11-23 17:01:15 -0500
commit0e622d39197f0b64b9e043fe75ac3634bf9f3a05 (patch)
tree0aa37b6321b32ee93b9cf53c99602c1eee411513 /arch
parent26d29d06ea020411559f75ec908db235ca1838d9 (diff)
of/address: sparc: Declare of_iomap as an extern function for sparc again
This bug-fix makes sure that of_iomap is defined extern for sparc so that the sparc-specific implementation of_iomap is once again used when including include/linux/of_address.h in a sparc context. OF_GPIO that is now available for sparc relies on this. The bug was inadvertently introduced in a850a75, "of/address: add empty static inlines for !CONFIG_OF", that added a static dummy inline for of_iomap when !CONFIG_OF_ADDRESS. However, CONFIG_OF_ADDRESS is never defined for sparc, but there is a sparc-specific implementation /arch/sparc/kernel/of_device_common.c. This fix takes the same approach as 0bce04b that solved the equivalent problem for of_address_to_resource. Signed-off-by: Andreas Larsson <andreas@gaisler.com> Acked-by: David Miller <davem@davemloft.net> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
Diffstat (limited to 'arch')
-rw-r--r--arch/sparc/include/asm/prom.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/sparc/include/asm/prom.h b/arch/sparc/include/asm/prom.h
index f93003123bce..67c62578d170 100644
--- a/arch/sparc/include/asm/prom.h
+++ b/arch/sparc/include/asm/prom.h
@@ -63,10 +63,13 @@ extern char *of_console_options;
63extern void irq_trans_init(struct device_node *dp); 63extern void irq_trans_init(struct device_node *dp);
64extern char *build_path_component(struct device_node *dp); 64extern char *build_path_component(struct device_node *dp);
65 65
66/* SPARC has a local implementation */ 66/* SPARC has local implementations */
67extern int of_address_to_resource(struct device_node *dev, int index, 67extern int of_address_to_resource(struct device_node *dev, int index,
68 struct resource *r); 68 struct resource *r);
69#define of_address_to_resource of_address_to_resource 69#define of_address_to_resource of_address_to_resource
70 70
71void __iomem *of_iomap(struct device_node *node, int index);
72#define of_iomap of_iomap
73
71#endif /* __KERNEL__ */ 74#endif /* __KERNEL__ */
72#endif /* _SPARC_PROM_H */ 75#endif /* _SPARC_PROM_H */