diff options
author | Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> | 2014-12-11 11:29:12 +0900 |
---|---|---|
committer | Stephane Desneux <stephane.desneux@open.eurogiciel.org> | 2015-02-04 11:16:22 +0100 |
commit | 8bfb12010aa642a595d173b7bb6bd058aafc57a6 (patch) | |
tree | 1155b16c73f41a71a722fa781c40993ea9b022b9 | |
parent | 6b404e2c27fb17e0ba8963ae6e4077a3cb15ba3c (diff) | |
download | kernel-common-8bfb12010aa642a595d173b7bb6bd058aafc57a6.tar.gz kernel-common-8bfb12010aa642a595d173b7bb6bd058aafc57a6.tar.bz2 kernel-common-8bfb12010aa642a595d173b7bb6bd058aafc57a6.zip |
micrel: fix masking off LED bits
Commit 20d8435a1cff (phy: micrel: add of configuration for LED mode) made the
obvious mistake when masking off the LED mode bits: forgot to do a logical NOT
to the mask with which it ANDs the register value, so that unrelated bits are
cleared instead.
Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Ben Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
(cherry picked from commit 28bdc499d647124fa5844453d35e6f5d1b3810dc)
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
-rw-r--r-- | drivers/net/phy/micrel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 0c9e4342f11d..5ad971a55c5d 100644 --- a/drivers/net/phy/micrel.c +++ b/drivers/net/phy/micrel.c @@ -167,7 +167,7 @@ static int kszphy_setup_led(struct phy_device *phydev, if (temp < 0) return temp; - temp &= 3 << shift; + temp &= ~(3 << shift); temp |= val << shift; rc = phy_write(phydev, reg, temp); |