Linux 4.6-rc6
[cris-mirror.git] / include / linux / of_net.h
blob9cd72aab76fe27af17105ba93b17584c773c842f
1 /*
2 * OF helpers for network devices.
4 * This file is released under the GPLv2
5 */
7 #ifndef __LINUX_OF_NET_H
8 #define __LINUX_OF_NET_H
10 #ifdef CONFIG_OF_NET
11 #include <linux/of.h>
13 struct net_device;
14 extern int of_get_phy_mode(struct device_node *np);
15 extern const void *of_get_mac_address(struct device_node *np);
16 extern struct net_device *of_find_net_device_by_node(struct device_node *np);
17 #else
18 static inline int of_get_phy_mode(struct device_node *np)
20 return -ENODEV;
23 static inline const void *of_get_mac_address(struct device_node *np)
25 return NULL;
28 static inline struct net_device *of_find_net_device_by_node(struct device_node *np)
30 return NULL;
32 #endif
34 #endif /* __LINUX_OF_NET_H */