Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);