diff options
author | Hauke Mehrtens <hauke@hauke-m.de> | 2018-12-01 18:13:13 +0100 |
---|---|---|
committer | Hauke Mehrtens <hauke@hauke-m.de> | 2018-12-06 22:54:27 +0100 |
commit | 43cd654d47939da85a6f280f4a4124b67e80c648 (patch) | |
tree | 064a04cfd464e75fedbdc127cc701d33291ed50e /backport/backport-include/linux/property.h | |
parent | c27e2f124d0186cc6e943bd09fe2f68a2d1276e0 (diff) |
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 <hauke@hauke-m.de>
Diffstat (limited to 'backport/backport-include/linux/property.h')
-rw-r--r-- | backport/backport-include/linux/property.h | 15 |
1 files changed, 15 insertions, 0 deletions
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 <linux/version.h> +#if LINUX_VERSION_IS_GEQ(3,18,17) +#include_next <linux/property.h> +#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_ */ |