From: Richard Retanubun <rretanubun.work@gmail.com>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
robh+dt@kernel.org, pawel.moll@arm.com, mark.rutland@arm.com,
ijc+devicetree@hellion.org.uk, galak@codeaurora.org,
thomas.petazzoni@free-electrons.com,
Richard Retanubun <rretanubun.work@gmail.com>
Subject: [PATCH] of: mdio: fixup of_phy_register_fixed_link parsing of new bindings
Date: Thu, 19 Jun 2014 13:35:34 -0400 [thread overview]
Message-ID: <1403199334-13212-1-git-send-email-rretanubun.work@gmail.com> (raw)
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>
---
drivers/of/of_mdio.c | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/of/of_mdio.c b/drivers/of/of_mdio.c
index 7700ddc..c389e7b 100644
--- a/drivers/of/of_mdio.c
+++ b/drivers/of/of_mdio.c
@@ -290,11 +290,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);
}
--
1.8.5.1
next reply other threads:[~2014-06-19 17:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-19 17:35 Richard Retanubun [this message]
2014-06-19 19:32 ` [PATCH] of: mdio: fixup of_phy_register_fixed_link parsing of new bindings Sergei Shtylyov
2014-06-19 21:28 ` [PATCH v2] " Richard Retanubun
2014-06-19 21:34 ` Sergei Shtylyov
2014-06-20 14:11 ` [PATCH v3] " Richard Retanubun
2014-06-23 4:35 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1403199334-13212-1-git-send-email-rretanubun.work@gmail.com \
--to=rretanubun.work@gmail.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=ijc+devicetree@hellion.org.uk \
--cc=mark.rutland@arm.com \
--cc=netdev@vger.kernel.org \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.org \
--cc=thomas.petazzoni@free-electrons.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).