net: dsa: Do not suspend/resume closed slave_dev
authorFlorian Fainelli <f.fainelli@gmail.com>
Wed, 1 Aug 2018 00:12:52 +0000 (17:12 -0700)
committerDavid S. Miller <davem@davemloft.net>
Wed, 1 Aug 2018 16:53:45 +0000 (09:53 -0700)
commita94c689e6c9e72e722f28339e12dff191ee5a265
tree4bfe4d4ef8eef05e5de579f9bab9bd178625b4b6
parentbc5b6c0b62b932626a135f516a41838c510c6eba
net: dsa: Do not suspend/resume closed slave_dev

If a DSA slave network device was previously disabled, there is no need
to suspend or resume it.

Fixes: 2446254915a7 ("net: dsa: allow switch drivers to implement suspend/resume hooks")
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/dsa/slave.c