mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-29 15:43:59 +08:00
micrel: fix masking off LED bits
Commit 20d8435a1c
(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>
This commit is contained in:
parent
3ab428a4c5
commit
28bdc499d6
@ -167,7 +167,7 @@ static int kszphy_setup_led(struct phy_device *phydev,
|
|||||||
if (temp < 0)
|
if (temp < 0)
|
||||||
return temp;
|
return temp;
|
||||||
|
|
||||||
temp &= 3 << shift;
|
temp &= ~(3 << shift);
|
||||||
temp |= val << shift;
|
temp |= val << shift;
|
||||||
rc = phy_write(phydev, reg, temp);
|
rc = phy_write(phydev, reg, temp);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user