1 --- a/backport-include/linux/of_net.h
6 -#include_next <linux/of_net.h>
7 -#include <linux/version.h>
8 -#include <linux/etherdevice.h>
10 -/* The behavior of of_get_mac_address() changed in kernel 5.2, it now
11 - * returns an error code and not NULL in case of an error.
13 -#if LINUX_VERSION_IS_LESS(5,13,0)
14 -static inline int backport_of_get_mac_address(struct device_node *np, u8 *mac_out)
16 - const void *mac = of_get_mac_address(np);
21 - return PTR_ERR(mac);
22 - ether_addr_copy(mac_out, mac);
26 -#define of_get_mac_address LINUX_BACKPORT(of_get_mac_address)
29 -#endif /* _BP_OF_NET_H */