Explorar o código

Merge tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6

Pull device tree regression fix from Grant Likely:
 "Simple build regression fix for DT device drivers on Sparc.  An
  earlier change had masked out the of_iomap() helper on SPARC."

* tag 'devicetree-for-linus' of git://git.secretlab.ca/git/linux-2.6:
  of/address: sparc: Declare of_iomap as an extern function for sparc again
Linus Torvalds %!s(int64=12) %!d(string=hai) anos
pai
achega
5e351cdc99
Modificáronse 2 ficheiros con 6 adicións e 1 borrados
  1. 4 1
      arch/sparc/include/asm/prom.h
  2. 2 0
      include/linux/of_address.h

+ 4 - 1
arch/sparc/include/asm/prom.h

@@ -63,10 +63,13 @@ extern char *of_console_options;
 extern void irq_trans_init(struct device_node *dp);
 extern void irq_trans_init(struct device_node *dp);
 extern char *build_path_component(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,
 extern int of_address_to_resource(struct device_node *dev, int index,
 				  struct resource *r);
 				  struct resource *r);
 #define of_address_to_resource of_address_to_resource
 #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 /* __KERNEL__ */
 #endif /* _SPARC_PROM_H */
 #endif /* _SPARC_PROM_H */

+ 2 - 0
include/linux/of_address.h

@@ -42,10 +42,12 @@ static inline struct device_node *of_find_matching_node_by_address(
 {
 {
 	return NULL;
 	return NULL;
 }
 }
+#ifndef of_iomap
 static inline void __iomem *of_iomap(struct device_node *device, int index)
 static inline void __iomem *of_iomap(struct device_node *device, int index)
 {
 {
 	return NULL;
 	return NULL;
 }
 }
+#endif
 static inline const __be32 *of_get_address(struct device_node *dev, int index,
 static inline const __be32 *of_get_address(struct device_node *dev, int index,
 					u64 *size, unsigned int *flags)
 					u64 *size, unsigned int *flags)
 {
 {