]> git.baikalelectronics.ru Git - kernel.git/commit
net/phy: micrel: fix bugged test on device tree loading for ksz9021
authorHubert Chaumette <hchaumette@adeneo-embedded.com>
Tue, 22 Apr 2014 13:01:04 +0000 (15:01 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 23 Apr 2014 18:58:58 +0000 (14:58 -0400)
commit3310d3b254e8aa60fc95417ea87298bdbd3320af
tree299f154b255bfc8d178e158a2db6a95137d80a91
parent20606c61fa3d1b2c2ce473ee2567dcb234255229
net/phy: micrel: fix bugged test on device tree loading for ksz9021

In ksz9021_load_values_from_of() val2 to val4 aren't tested against their
initialization value.
This causes the test to always succeed, and this value to be used as if it
was loaded from the devicetree instead of being ignored, in case of a
missing/invalid property in the ethernet OF device node.
As a result, the value "0" is written to the relevant registers.

Change the conditions to test against the right initialization value.

Signed-off-by: Hubert Chaumette <hchaumette@adeneo-embedded.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/micrel.c