summaryrefslogtreecommitdiffstats
path: root/include/linux/of_address.h
diff options
context:
space:
mode:
authorAndreas Larsson <andreas@gaisler.com>2012-11-23 12:24:09 +0100
committerGrant Likely <grant.likely@secretlab.ca>2012-11-23 22:01:15 +0000
commit0e622d39197f0b64b9e043fe75ac3634bf9f3a05 (patch)
tree0aa37b6321b32ee93b9cf53c99602c1eee411513 /include/linux/of_address.h
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 'include/linux/of_address.h')
-rw-r--r--include/linux/of_address.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/of_address.h b/include/linux/of_address.h
index e20e3af68fb..0506eb53519 100644
--- a/include/linux/of_address.h
+++ b/include/linux/of_address.h
@@ -42,10 +42,12 @@ static inline struct device_node *of_find_matching_node_by_address(
{
return NULL;
}
+#ifndef of_iomap
static inline void __iomem *of_iomap(struct device_node *device, int index)
{
return NULL;
}
+#endif
static inline const __be32 *of_get_address(struct device_node *dev, int index,
u64 *size, unsigned int *flags)
{