]> git.baikalelectronics.ru Git - kernel.git/commit
net: phy: leds: Refactor "no link" handler into a separate function
authorMaciej S. Szmigiero <mail@maciej.szmigiero.name>
Wed, 1 Nov 2017 23:48:45 +0000 (00:48 +0100)
committerDavid S. Miller <davem@davemloft.net>
Wed, 8 Nov 2017 01:24:14 +0000 (10:24 +0900)
commitbba2cb8cd1cdcca7066348b7c4ad44c225525bb3
treebaffba5d147596f004e239d8f64285701e2ee817
parent7fb248774e130baf219e6d87d77faa7048b8cbd2
net: phy: leds: Refactor "no link" handler into a separate function

Currently, phy_led_trigger_change_speed() is handling a "no link" condition
like it was some kind of an error (using "goto" to a code at the function
end).

However, having no link at PHY is an ordinary operational state, so let's
handle it in an appropriately named separate function so it is more obvious
what the code is doing.

Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_led_triggers.c