]> git.baikalelectronics.ru Git - kernel.git/commit
net: stmmac: allow to split suspend/resume from init/exit callbacks
authorVincent Palatin <vpalatin@chromium.org>
Wed, 15 Jun 2016 18:32:21 +0000 (11:32 -0700)
committerDavid S. Miller <davem@davemloft.net>
Thu, 16 Jun 2016 21:14:58 +0000 (14:14 -0700)
commit9535fbf3539f84afe0bab25d46e159dd38712411
treeb7a37d0b6e44dcddc076bc52e1a6620814179eea
parent2cd4ab0cfdf3cec620d2e7410e3cb9796f687af7
net: stmmac: allow to split suspend/resume from init/exit callbacks

Let the stmmac platform drivers provide dedicated suspend and resume
callbacks rather than always re-using the init and exits callbacks.
If the driver does not provide the suspend or resume callback, we fall
back to the old behavior trying to use exit or init.

This allows a specific platform to perform only a partial power-down on
suspend if Wake-on-Lan is enabled but always perform the full shutdown
sequence if the module is unloaded.

Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
include/linux/stmmac.h