Skip to content

Commit

Permalink
of: mdio: fixup of_phy_register_fixed_link parsing of new bindings
Browse files Browse the repository at this point in the history
Fixes commit 3be2a49 ("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 <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
rretanubun authored and davem330 committed Jun 23, 2014
1 parent 363c2cd commit a72e154
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions drivers/of/of_mdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit a72e154

Please sign in to comment.