diff options
author | Thierry Reding <treding@nvidia.com> | 2014-10-01 07:59:00 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2014-10-01 15:24:00 -0400 |
commit | e506d405ac7d34d03996c97ac68aa2ac010be64a (patch) | |
tree | 7537278bdfcd62e05c9dcc619039dc6effc60dc5 /net/dsa/dsa.c | |
parent | 3c87dcbfb36ce6d3d9087f0163c02ba5690d9a85 (diff) |
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: Thierry Reding <treding@nvidia.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/dsa/dsa.c')
-rw-r--r-- | net/dsa/dsa.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/net/dsa/dsa.c b/net/dsa/dsa.c index 6905f2d84c44..22f34cf4cb27 100644 --- a/net/dsa/dsa.c +++ b/net/dsa/dsa.c | |||
@@ -238,6 +238,7 @@ static void dsa_switch_destroy(struct dsa_switch *ds) | |||
238 | { | 238 | { |
239 | } | 239 | } |
240 | 240 | ||
241 | #ifdef CONFIG_PM_SLEEP | ||
241 | static int dsa_switch_suspend(struct dsa_switch *ds) | 242 | static int dsa_switch_suspend(struct dsa_switch *ds) |
242 | { | 243 | { |
243 | int i, ret = 0; | 244 | int i, ret = 0; |
@@ -280,6 +281,7 @@ static int dsa_switch_resume(struct dsa_switch *ds) | |||
280 | 281 | ||
281 | return 0; | 282 | return 0; |
282 | } | 283 | } |
284 | #endif | ||
283 | 285 | ||
284 | 286 | ||
285 | /* link polling *************************************************************/ | 287 | /* link polling *************************************************************/ |