]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - include/linux/of_net.h
mm/hotplug: invalid PFNs from pfn_to_online_page()
[mirror_ubuntu-bionic-kernel.git] / include / linux / of_net.h
CommitLineData
4b6ba8aa
DD
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>
aa836df9
FF
12
13struct net_device;
7e0bdf15 14extern int of_get_phy_mode(struct device_node *np);
4b6ba8aa 15extern const void *of_get_mac_address(struct device_node *np);
aa836df9 16extern struct net_device *of_find_net_device_by_node(struct device_node *np);
65b3841b 17#else
7e0bdf15 18static inline int of_get_phy_mode(struct device_node *np)
65b3841b
GR
19{
20 return -ENODEV;
21}
22
23static inline const void *of_get_mac_address(struct device_node *np)
24{
25 return NULL;
26}
aa836df9
FF
27
28static inline struct net_device *of_find_net_device_by_node(struct device_node *np)
29{
30 return NULL;
31}
4b6ba8aa
DD
32#endif
33
34#endif /* __LINUX_OF_NET_H */