fs: Provide __inode_get_bytes()
[sfrench/cifs-2.6.git] / include / linux / of_net.h
1 /*
2  * OF helpers for network devices.
3  *
4  * This file is released under the GPLv2
5  */
6
7 #ifndef __LINUX_OF_NET_H
8 #define __LINUX_OF_NET_H
9
10 #ifdef CONFIG_OF_NET
11 #include <linux/of.h>
12
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)
19 {
20         return -ENODEV;
21 }
22
23 static inline const void *of_get_mac_address(struct device_node *np)
24 {
25         return NULL;
26 }
27
28 static inline struct net_device *of_find_net_device_by_node(struct device_node *np)
29 {
30         return NULL;
31 }
32 #endif
33
34 #endif /* __LINUX_OF_NET_H */