提交 28bdc499 编写于 作者: S Sergei Shtylyov 提交者: 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: NSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Acked-by: NLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: NBen Dooks <ben.dooks@codethink.co.uk>
Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册