]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commit8d3dc10d218a459bb2ed1dfb0f1ac4dbc564f702
tree658f90dfe2de003236687f0bf3ee455e2267063f
parent15e010297823b2e5ba969c80593acaa3291c1444
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