From 3f3b1632022fcc8317fa3b3c1236471415b3a6b8 Mon Sep 17 00:00:00 2001 From: Anton Vorontsov Date: Fri, 28 Nov 2008 09:13:23 +0000 Subject: 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 Acked-by: David S. Miller Acked-by: Grant Likely Signed-off-by: Paul Mackerras --- arch/powerpc/include/asm/device.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'arch/powerpc/include') diff --git a/arch/powerpc/include/asm/device.h b/arch/powerpc/include/asm/device.h index dfd504caccc..7d2277cef09 100644 --- a/arch/powerpc/include/asm/device.h +++ b/arch/powerpc/include/asm/device.h @@ -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 */ -- cgit v1.2.3