From d6b9f9f2d90cb24bd69fb7a03bb0a815590437c9 Mon Sep 17 00:00:00 2001 From: liujie_answer Date: Fri, 23 May 2025 17:39:17 +0800 Subject: [PATCH] anolis: sxe: Fix sxe compile errors without CONFIG_PM_SLEEP ANBZ: #20921 when compile sxe without CONFIG_PM_SLEEP, it is failed: CC [M] drivers/net/wireless/ath/ath9k/htc_drv_txrx.o drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c:1071:12: error: 'sxe_resume' defined but not used [-Werror=unused-function] 1071 | static int sxe_resume(struct device *dev) | ^~~~~~~~~~ drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c:1038:12: error: 'sxe_suspend' defined but not used [-Werror=unused-function] 1038 | static int sxe_suspend(struct device *dev) | ^~~~~~~~~~~ Signed-off-by: liujie_answer --- drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c | 2 +- drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c b/drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c index fa53cbafdbf6..e4199dd775fa 100644 --- a/drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c +++ b/drivers/net/ethernet/linkdata/sxe/sxepf/sxe_main.c @@ -1034,7 +1034,7 @@ static void sxe_shutdown(struct pci_dev *pdev) } } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static int sxe_suspend(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); diff --git a/drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c b/drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c index 8fdf5fc1b81c..fcdf386fbd1c 100644 --- a/drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c +++ b/drivers/net/ethernet/linkdata/sxevf/sxevf/sxevf_main.c @@ -539,7 +539,7 @@ static s32 sxevf_suspend(struct device *dev) return ret; } -#ifdef CONFIG_PM +#ifdef CONFIG_PM_SLEEP static s32 sxevf_resume(struct device *dev) { struct pci_dev *pdev = to_pci_dev(dev); -- Gitee