Commit 3f3b1632 authored by Anton Vorontsov's avatar Anton Vorontsov Committed by Paul Mackerras

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: default avatarAnton Vorontsov <avorontsov@ru.mvista.com>
Acked-by: default avatarDavid S. Miller <davem@davemloft.net>
Acked-by: default avatarGrant Likely <grant.likely@secretlab.ca>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent a0e2f9f4
......@@ -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 */
......@@ -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 */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment