提交 e506d405 编写于 作者: T Thierry Reding 提交者: David S. Miller

net: dsa: Fix build warning for !PM_SLEEP

The dsa_switch_suspend() and dsa_switch_resume() functions are only used
when PM_SLEEP is enabled, so they need #ifdef CONFIG_PM_SLEEP protection
to avoid a compiler warning.
Signed-off-by: NThierry Reding <treding@nvidia.com>
Acked-by: NFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 3c87dcbf
......@@ -238,6 +238,7 @@ static void dsa_switch_destroy(struct dsa_switch *ds)
{
}
#ifdef CONFIG_PM_SLEEP
static int dsa_switch_suspend(struct dsa_switch *ds)
{
int i, ret = 0;
......@@ -280,6 +281,7 @@ static int dsa_switch_resume(struct dsa_switch *ds)
return 0;
}
#endif
/* link polling *************************************************************/
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册