diff options
author | Anton Vorontsov <avorontsov@ru.mvista.com> | 2008-11-28 04:13:23 -0500 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2008-12-03 05:03:54 -0500 |
commit | 3f3b1632022fcc8317fa3b3c1236471415b3a6b8 (patch) | |
tree | 9b076af092207b0a6a1d1b7f6524ceb6deff3db3 /arch/powerpc | |
parent | a0e2f9f4a2487572803d5a00c7302db30e4c60d3 (diff) |
powerpc and sparc: Introduce dev_archdata node accessors
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>
Diffstat (limited to 'arch/powerpc')
-rw-r--r-- | arch/powerpc/include/asm/device.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h index dfd504caccc1..7d2277cef09a 100644 --- a/arch/powerpc/include/asm/device.h +++ b/arch/powerpc/include/asm/device.h | |||
@@ -18,4 +18,16 @@ struct dev_archdata { | |||
18 | void *dma_data; | 18 | void *dma_data; |
19 | }; | 19 | }; |
20 | 20 | ||
21 | static inline void dev_archdata_set_node(struct dev_archdata *ad, | ||
22 | struct device_node *np) | ||
23 | { | ||
24 | ad->of_node = np; | ||
25 | } | ||
26 | |||
27 | static inline struct device_node * | ||
28 | dev_archdata_get_node(const struct dev_archdata *ad) | ||
29 | { | ||
30 | return ad->of_node; | ||
31 | } | ||
32 | |||
21 | #endif /* _ASM_POWERPC_DEVICE_H */ | 33 | #endif /* _ASM_POWERPC_DEVICE_H */ |