diff options
author | Wei Yongjun <weiyongjun1@huawei.com> | 2021-03-22 13:23:59 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-03-22 21:26:41 +0100 |
commit | 7ec05a6035480f3a5934b2b31222620b2e906163 (patch) | |
tree | ca76761939ee2826502655618fc5a9daae212340 /net/ethernet | |
parent | net: l2tp: Fix a typo (diff) | |
download | linux-7ec05a6035480f3a5934b2b31222620b2e906163.tar.xz linux-7ec05a6035480f3a5934b2b31222620b2e906163.zip |
net: stmmac: platform: fix build error with !CONFIG_PM_SLEEP
Get rid of the CONFIG_PM_SLEEP ifdefery to fix the build error
and use __maybe_unused for the suspend()/resume() hooks to avoid
build warning:
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:769:21:
error: 'stmmac_runtime_suspend' undeclared here (not in a function); did you mean 'stmmac_suspend'?
769 | SET_RUNTIME_PM_OPS(stmmac_runtime_suspend, stmmac_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~~~~~
./include/linux/pm.h:342:21: note: in definition of macro 'SET_RUNTIME_PM_OPS'
342 | .runtime_suspend = suspend_fn, \
| ^~~~~~~~~~
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:769:45:
error: 'stmmac_runtime_resume' undeclared here (not in a function)
769 | SET_RUNTIME_PM_OPS(stmmac_runtime_suspend, stmmac_runtime_resume, NULL)
| ^~~~~~~~~~~~~~~~~~~~~
./include/linux/pm.h:343:20: note: in definition of macro 'SET_RUNTIME_PM_OPS'
343 | .runtime_resume = resume_fn, \
| ^~~~~~~~~
Fixes: 5ec55823438e ("net: stmmac: add clocks management for gmac driver")
Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ethernet')
0 files changed, 0 insertions, 0 deletions