From: Sergei Shtylyov Date: Tue, 18 Mar 2014 23:58:16 +0000 (+0300) Subject: micrel: fix masking off LED bits X-Git-Tag: upstream/snapshot3+hdmi~3^2 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git;a=commitdiff_plain;h=fb0c8852db885be505ccb75d7ace3d4648e8222a 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 Acked-by: Laurent Pinchart Acked-by: Ben Dooks Reviewed-by: Florian Fainelli Signed-off-by: David S. Miller (cherry picked from commit 28bdc499d647124fa5844453d35e6f5d1b3810dc) Signed-off-by: Simon Horman --- diff --git a/drivers/net/phy/micrel.c b/drivers/net/phy/micrel.c index 0c9e434..5ad971a 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);