aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/of_mdio.h
diff options
context:
space:
mode:
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>2012-08-23 21:58:59 -0400
committerDavid S. Miller <davem@davemloft.net>2012-08-30 12:37:52 -0400
commitf9dc9ac51610a35629c8211b6b8c9b0c65cf0e1d (patch)
treeb5985d13680c2baf1bdcd6c28411b89672fb1932 /include/linux/of_mdio.h
parentee13040901c11b016d996ab5a946acaaa3461737 (diff)
of/mdio: Add dummy functions in of_mdio.h.
This patch adds dummy functions in of_mdio.h, so that driver need not ifdef there code with CONFIG_OF. Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/of_mdio.h')
-rw-r--r--include/linux/of_mdio.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h
index 912c27a0f7ee..6ef49b803efb 100644
--- a/include/linux/of_mdio.h
+++ b/include/linux/of_mdio.h
@@ -12,6 +12,7 @@
12#include <linux/phy.h> 12#include <linux/phy.h>
13#include <linux/of.h> 13#include <linux/of.h>
14 14
15#ifdef CONFIG_OF
15extern int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np); 16extern int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np);
16extern struct phy_device *of_phy_find_device(struct device_node *phy_np); 17extern struct phy_device *of_phy_find_device(struct device_node *phy_np);
17extern struct phy_device *of_phy_connect(struct net_device *dev, 18extern struct phy_device *of_phy_connect(struct net_device *dev,
@@ -24,4 +25,36 @@ extern struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
24 25
25extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); 26extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np);
26 27
28#else /* CONFIG_OF */
29int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np)
30{
31 return -ENOSYS;
32}
33
34struct phy_device *of_phy_find_device(struct device_node *phy_np)
35{
36 return NULL;
37}
38
39struct phy_device *of_phy_connect(struct net_device *dev,
40 struct device_node *phy_np,
41 void (*hndlr)(struct net_device *),
42 u32 flags, phy_interface_t iface)
43{
44 return NULL;
45}
46
47struct phy_device *of_phy_connect_fixed_link(struct net_device *dev,
48 void (*hndlr)(struct net_device *),
49 phy_interface_t iface)
50{
51 return NULL;
52}
53
54struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np)
55{
56 return NULL;
57}
58#endif /* CONFIG_OF */
59
27#endif /* __LINUX_OF_MDIO_H */ 60#endif /* __LINUX_OF_MDIO_H */