net: phy: mscc: factorize code for LEDs mode
authorQuentin Schulz <quentin.schulz@bootlin.com>
Mon, 3 Sep 2018 08:48:47 +0000 (10:48 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 4 Sep 2018 17:47:53 +0000 (10:47 -0700)
commit11bfdabb7ff572935fb110df345ffe946eda905e
tree0cf7b08a41e5170fb8b5a85d318970ef0c421601
parent802869f4e5423457aa547ea3330eff34b9e16d68
net: phy: mscc: factorize code for LEDs mode

LEDs modes are set the same way, except they are offset by 4 times the
index of the LED.

Let's factorize all the code so that it's easier to add support for the
4 LEDs of the VSC8584 PHY.

Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/mscc.c