Commit 28bdc499 authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by David S. Miller

micrel: fix masking off LED bits

Commit 20d8435a (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: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: default avatarBen Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 3ab428a4
......@@ -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);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment