Commit 483ed89
net: stmmac: platform: fix build error with !CONFIG_PM_SLEEP
commit 7ec05a6 upstream
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: 5ec5582 ("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>
Signed-off-by: Meng Li <Meng.Li@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>1 parent 3afe11b commit 483ed89
1 file changed
Lines changed: 4 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
720 | 720 | | |
721 | 721 | | |
722 | 722 | | |
723 | | - | |
724 | 723 | | |
725 | 724 | | |
726 | 725 | | |
727 | 726 | | |
728 | 727 | | |
729 | 728 | | |
730 | 729 | | |
731 | | - | |
| 730 | + | |
732 | 731 | | |
733 | 732 | | |
734 | 733 | | |
| |||
749 | 748 | | |
750 | 749 | | |
751 | 750 | | |
752 | | - | |
| 751 | + | |
753 | 752 | | |
754 | 753 | | |
755 | 754 | | |
| |||
761 | 760 | | |
762 | 761 | | |
763 | 762 | | |
764 | | - | |
| 763 | + | |
765 | 764 | | |
766 | 765 | | |
767 | 766 | | |
| |||
771 | 770 | | |
772 | 771 | | |
773 | 772 | | |
774 | | - | |
| 773 | + | |
775 | 774 | | |
776 | 775 | | |
777 | 776 | | |
778 | 777 | | |
779 | 778 | | |
780 | 779 | | |
781 | | - | |
782 | 780 | | |
783 | 781 | | |
784 | 782 | | |
| |||
0 commit comments