Skip to content

Commit 078838f

Browse files
arndbkuba-moo
authored andcommitted
net: ethernet: ti: am65-cpsw: fix CONFIG_PM #ifdef
The #ifdef check is incorrect and leads to a warning: drivers/net/ethernet/ti/am65-cpsw-nuss.c:1679:13: error: 'am65_cpsw_nuss_remove_rx_chns' defined but not used [-Werror=unused-function] 1679 | static void am65_cpsw_nuss_remove_rx_chns(void *data) It's better to remove the #ifdef here and use the modern SYSTEM_SLEEP_PM_OPS() macro instead. Fixes: 24bc19b ("net: ethernet: ti: am65-cpsw: Add suspend/resume support") Signed-off-by: Arnd Bergmann <[email protected]> Reviewed-by: Alexander Duyck <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
1 parent 13e3c77 commit 078838f

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

drivers/net/ethernet/ti/am65-cpsw-nuss.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2878,7 +2878,6 @@ static int am65_cpsw_nuss_remove(struct platform_device *pdev)
28782878
return 0;
28792879
}
28802880

2881-
#ifdef CONFIG_PM_SLEEP
28822881
static int am65_cpsw_nuss_suspend(struct device *dev)
28832882
{
28842883
struct am65_cpsw_common *common = dev_get_drvdata(dev);
@@ -2964,10 +2963,9 @@ static int am65_cpsw_nuss_resume(struct device *dev)
29642963

29652964
return 0;
29662965
}
2967-
#endif /* CONFIG_PM_SLEEP */
29682966

29692967
static const struct dev_pm_ops am65_cpsw_nuss_dev_pm_ops = {
2970-
SET_SYSTEM_SLEEP_PM_OPS(am65_cpsw_nuss_suspend, am65_cpsw_nuss_resume)
2968+
SYSTEM_SLEEP_PM_OPS(am65_cpsw_nuss_suspend, am65_cpsw_nuss_resume)
29712969
};
29722970

29732971
static struct platform_driver am65_cpsw_nuss_driver = {

0 commit comments

Comments
 (0)