提交 0e622d39 编写于 作者: A Andreas Larsson 提交者: Grant Likely

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 a850a755, "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 0bce04be that solved the equivalent problem
for of_address_to_resource.
Signed-off-by: NAndreas Larsson <andreas@gaisler.com>
Acked-by: NDavid Miller <davem@davemloft.net>
Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
上级 26d29d06
......@@ -63,10 +63,13 @@ extern char *of_console_options;
extern void irq_trans_init(struct device_node *dp);
extern char *build_path_component(struct device_node *dp);
/* SPARC has a local implementation */
/* SPARC has local implementations */
extern int of_address_to_resource(struct device_node *dev, int index,
struct resource *r);
#define of_address_to_resource of_address_to_resource
void __iomem *of_iomap(struct device_node *node, int index);
#define of_iomap of_iomap
#endif /* __KERNEL__ */
#endif /* _SPARC_PROM_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)
{
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册