of/address: sparc: Declare of_iomap as an extern function for sparc again
Subsystems (3)
Andreas Larsson
maintainerPATCH 1/1 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.
--- arch/sparc/include/asm/prom.h | 5 ++++- include/linux/of_address.h | 2 ++ 2 files changed, 6 insertions(+), 1 deletions(-)
arch/sparc/include/asm/prom.h +4 -1
@@ -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 */
include/linux/of_address.h +2 -0
@@ -42,10 +42,12 @@ static inline struct device_node *of_find_matching_node_by_address( {return NULL ; } +#ifndef of_iomapstatic 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) {
Signature · 1 line
1.7.0.4
David Miller
maintainerFrom: Andreas Larsson <[email protected]>
Date: Fri, 23 Nov 2012 12:24:09 +0100
Quoted 10 lines
This bug-fix makes sure that
of_iomapis defined extern for sparc so that the sparc-specific implementationof_iomapis once again used when includinginclude/linux/of_address.hin a sparc context.OF_GPIOthat 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_iomapwhen !CONFIG_OF_ADDRESS. However,CONFIG_OF_ADDRESSis never defined for sparc, but there is a sparc-specific implementation /arch/sparc/kernel/of_device_common.c.
Quoted 4 lines
This fix takes the same approach as 0bce04b that solved the equivalent problem for
of_address_to_resource.Signed-off-by Andreas Larsson <[email protected]>
Grant, can you possibly merge this to Linus while I'm travelling? That would help me a lot.
Thanks!
Quoted 13 lines · David Miller
From: Andreas Larsson <[email protected]>
Date: Fri, 23 Nov 2012 12:24:09 +0100Quoted 10 lines
This bug-fix makes sure that
of_iomapis defined extern for sparc so that the sparc-specific implementationof_iomapis once again used when includinginclude/linux/of_address.hin a sparc context.OF_GPIOthat 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_iomapwhen !CONFIG_OF_ADDRESS. However,CONFIG_OF_ADDRESSis never defined for sparc, but there is a sparc-specific implementation /arch/sparc/kernel/of_device_common.c.
Quoted 7 lines
Quoted 4 lines
This fix takes the same approach as 0bce04b that solved the equivalent problem for
of_address_to_resource.Signed-off-by Andreas Larsson <[email protected]>Grant, can you possibly merge this to Linus while I'm travelling? That would help me a lot.
Yup, I'm doing it right now.
g.
Cc'ing stable since this should go into previous kernels too.
g.
Quoted 34 lines · Grant Likely
Quoted 4 lines · David Miller
From: Andreas Larsson <[email protected]>
Date: Fri, 23 Nov 2012 12:24:09 +0100Quoted 1 line
This bug-fix makes sure that
of_iomapis defined extern for sparcso that the
Quoted 1 line
Quoted 1 line
sparc-specific implementation
of_iomapis once again used whenincluding
Quoted 1 line
Quoted 1 line
include/linux/of_address.hin a sparc context.OF_GPIOthat is nowavailable for
Quoted 3 lines
Quoted 3 lines
sparc relies on this.
The bug was inadvertently introduced in a850a75, "of/address: add
empty static
Quoted 1 line
Quoted 1 line
inlines for !CONFIG_OF", that added a static dummy inline for
of_iomapwhenQuoted 1 line
Quoted 1 line
!CONFIG_OF_ADDRESS. However,
CONFIG_OF_ADDRESSis never defined forsparc, but
Quoted 1 line
Quoted 1 line
there is a sparc-specific implementation
/arch/sparc/kernel/of_device_common.c.
Quoted 2 lines
Quoted 2 lines
This fix takes the same approach as 0bce04b that solved the
equivalent problem
Quoted 6 lines
Quoted 3 lines
for
of_address_to_resource.Signed-off-by Andreas Larsson <[email protected]>Grant, can you possibly merge this to Linus while I'm travelling? That would help me a lot.
Yup, I'm doing it right now.
g.
Signature · 2 lines
Grant Likely, P.Eng. Secret Lab Technologies Ltd.
Greg KH
maintainerQuoted 1 line · Grant Likely
Cc'ing stable since this should go into previous kernels too.
<formletter>
This is not the correct way to submit patches for inclusion in the stable kernel tree. Please read Documentation/stable_kernel_rules.txt for how to do this properly.
</formletter>