diff options
Diffstat (limited to 'net/dsa/legacy.c')
-rw-r--r-- | net/dsa/legacy.c | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/net/dsa/legacy.c b/net/dsa/legacy.c index ad345c8b0b06..7281098df04e 100644 --- a/net/dsa/legacy.c +++ b/net/dsa/legacy.c | |||
@@ -289,53 +289,6 @@ static void dsa_switch_destroy(struct dsa_switch *ds) | |||
289 | dsa_switch_unregister_notifier(ds); | 289 | dsa_switch_unregister_notifier(ds); |
290 | } | 290 | } |
291 | 291 | ||
292 | #ifdef CONFIG_PM_SLEEP | ||
293 | int dsa_switch_suspend(struct dsa_switch *ds) | ||
294 | { | ||
295 | int i, ret = 0; | ||
296 | |||
297 | /* Suspend slave network devices */ | ||
298 | for (i = 0; i < ds->num_ports; i++) { | ||
299 | if (!dsa_is_port_initialized(ds, i)) | ||
300 | continue; | ||
301 | |||
302 | ret = dsa_slave_suspend(ds->ports[i].netdev); | ||
303 | if (ret) | ||
304 | return ret; | ||
305 | } | ||
306 | |||
307 | if (ds->ops->suspend) | ||
308 | ret = ds->ops->suspend(ds); | ||
309 | |||
310 | return ret; | ||
311 | } | ||
312 | EXPORT_SYMBOL_GPL(dsa_switch_suspend); | ||
313 | |||
314 | int dsa_switch_resume(struct dsa_switch *ds) | ||
315 | { | ||
316 | int i, ret = 0; | ||
317 | |||
318 | if (ds->ops->resume) | ||
319 | ret = ds->ops->resume(ds); | ||
320 | |||
321 | if (ret) | ||
322 | return ret; | ||
323 | |||
324 | /* Resume slave network devices */ | ||
325 | for (i = 0; i < ds->num_ports; i++) { | ||
326 | if (!dsa_is_port_initialized(ds, i)) | ||
327 | continue; | ||
328 | |||
329 | ret = dsa_slave_resume(ds->ports[i].netdev); | ||
330 | if (ret) | ||
331 | return ret; | ||
332 | } | ||
333 | |||
334 | return 0; | ||
335 | } | ||
336 | EXPORT_SYMBOL_GPL(dsa_switch_resume); | ||
337 | #endif | ||
338 | |||
339 | /* platform driver init and cleanup *****************************************/ | 292 | /* platform driver init and cleanup *****************************************/ |
340 | static int dev_is_class(struct device *dev, void *class) | 293 | static int dev_is_class(struct device *dev, void *class) |
341 | { | 294 | { |