net: phy: marvell: optimize logic for page changing during init
authorUwe Kleine-König <uwe@kleine-koenig.org>
Thu, 10 Nov 2016 14:03:01 +0000 (15:03 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sun, 13 Nov 2016 17:04:50 +0000 (12:04 -0500)
commitb5718b5aeff1930ab06efe5683b54f1a3b2795fb
tree658f90dfe2de003236687f0bf3ee455e2267063f
parent849dcce3fee7f2a68b2c82141e2f3b919bce3c79
net: phy: marvell: optimize logic for page changing during init

Instead of remembering if the page was changed, just compare the current
page to the saved one. This is easier and has the advantage to save a
register write if the page was already restored.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/marvell.c