]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
powerpc and sparc: Introduce dev_archdata node accessors
authorAnton Vorontsov <avorontsov@ru.mvista.com>
Fri, 28 Nov 2008 09:13:23 +0000 (09:13 +0000)
committerPaul Mackerras <paulus@samba.org>
Wed, 3 Dec 2008 10:03:54 +0000 (21:03 +1100)
The name of the device_node field differ across the platforms, so we
have to implement inlined accessors.  This is needed to avoid ugly
#ifdef in the generic code.

Signed-off-by: Anton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: David S. Miller <davem@davemloft.net>
Acked-by: Grant Likely <grant.likely@secretlab.ca>
Signed-off-by: Paul Mackerras <paulus@samba.org>
arch/powerpc/include/asm/device.h
arch/sparc/include/asm/device.h

index dfd504caccc1c711216adc077b351eb5710f32ca..7d2277cef09a8502b22bdea95185f132a479f7db 100644 (file)
@@ -18,4 +18,16 @@ struct dev_archdata {
        void                    *dma_data;
 };
 
+static inline void dev_archdata_set_node(struct dev_archdata *ad,
+                                        struct device_node *np)
+{
+       ad->of_node = np;
+}
+
+static inline struct device_node *
+dev_archdata_get_node(const struct dev_archdata *ad)
+{
+       return ad->of_node;
+}
+
 #endif /* _ASM_POWERPC_DEVICE_H */
index 19790eb99cc6830820522a74c11492528ec0f567..3702e087df2c4cbcdab561f7720a2d8f23ebc543 100644 (file)
@@ -20,4 +20,16 @@ struct dev_archdata {
        int                     numa_node;
 };
 
+static inline void dev_archdata_set_node(struct dev_archdata *ad,
+                                        struct device_node *np)
+{
+       ad->prom_node = np;
+}
+
+static inline struct device_node *
+dev_archdata_get_node(const struct dev_archdata *ad)
+{
+       return ad->prom_node;
+}
+
 #endif /* _ASM_SPARC_DEVICE_H */