diff options
author | Richard Retanubun <rretanubun.work@gmail.com> | 2014-06-20 10:11:07 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-06-22 21:35:14 -0700 |
commit | a72e154107340b868e69e0afeb418c9ec0994317 (patch) | |
tree | 0c89ac360b4d6945c8fcbdf9227385868d8fc918 /drivers/of/of_mdio.c | |
parent | 363c2cd657afd8138b06f459baa9b6eb892d488f (diff) | |
download | linux-a72e154107340b868e69e0afeb418c9ec0994317.tar.bz2 |
of: mdio: fixup of_phy_register_fixed_link parsing of new bindings
Fixes commit 3be2a49e5c08 ("of: provide a binding for fixed link PHYs")
Fix the parsing of the new fixed link dts bindings for duplex,
pause, and asym_pause by using the correct device node pointer.
Signed-off-by: Richard Retanubun <rretanubun.work@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/of/of_mdio.c')
-rw-r--r-- | drivers/of/of_mdio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c index fb4a59830648..a3bf2122a8d5 100644 --- a/drivers/of/of_mdio.c +++ b/drivers/of/of_mdio.c @@ -323,11 +323,13 @@ int of_phy_register_fixed_link(struct device_node *np) fixed_link_node = of_get_child_by_name(np, "fixed-link"); if (fixed_link_node) { status.link = 1; - status.duplex = of_property_read_bool(np, "full-duplex"); + status.duplex = of_property_read_bool(fixed_link_node, + "full-duplex"); if (of_property_read_u32(fixed_link_node, "speed", &status.speed)) return -EINVAL; - status.pause = of_property_read_bool(np, "pause"); - status.asym_pause = of_property_read_bool(np, "asym-pause"); + status.pause = of_property_read_bool(fixed_link_node, "pause"); + status.asym_pause = of_property_read_bool(fixed_link_node, + "asym-pause"); of_node_put(fixed_link_node); return fixed_phy_register(PHY_POLL, &status, np); } |