From 43cd654d47939da85a6f280f4a4124b67e80c648 Mon Sep 17 00:00:00 2001 From: Hauke Mehrtens Date: Sat, 1 Dec 2018 18:13:13 +0100 Subject: backports: Add device_get_mac_address() This was added in upstream commit 4c96b7dc0d39 ("Add a matching set of device_ functions for determining mac/phy") and is used by ath10k now. In the mainline kernel it uses device_property_read_u8_array(), but that was only introduced in kernel 3.18, use of_property_read_u8_array() only on all kernel versions where this backport is needed which was added much earlier. Signed-off-by: Hauke Mehrtens --- backport/backport-include/linux/property.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 backport/backport-include/linux/property.h (limited to 'backport/backport-include/linux/property.h') diff --git a/backport/backport-include/linux/property.h b/backport/backport-include/linux/property.h new file mode 100644 index 00000000..a0d7bed1 --- /dev/null +++ b/backport/backport-include/linux/property.h @@ -0,0 +1,15 @@ +#ifndef __BACKPORT_LINUX_PROPERTY_H_ +#define __BACKPORT_LINUX_PROPERTY_H_ +#include +#if LINUX_VERSION_IS_GEQ(3,18,17) +#include_next +#endif + +#if LINUX_VERSION_IS_LESS(4,3,0) + +#define device_get_mac_address LINUX_BACKPORT(device_get_mac_address) +void *device_get_mac_address(struct device *dev, char *addr, int alen); + +#endif /* < 4.3 */ + +#endif /* __BACKPORT_LINUX_PROPERTY_H_ */ -- cgit v1.2.3