Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+12 −0
Original line number Original line Diff line number Diff line
@@ -18,4 +18,16 @@ struct dev_archdata {
	void			*dma_data;
	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 */
#endif /* _ASM_POWERPC_DEVICE_H */
+12 −0
Original line number Original line Diff line number Diff line
@@ -20,4 +20,16 @@ struct dev_archdata {
	int			numa_node;
	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 */
#endif /* _ASM_SPARC_DEVICE_H */