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>
This commit is contained in:
Anton Vorontsov 2008-11-28 09:13:23 +00:00 committed by Paul Mackerras
parent a0e2f9f4a2
commit 3f3b163202
2 changed files with 24 additions and 0 deletions

View 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 */

View 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 */