Commit ea825e70 authored by Florian Fainelli's avatar Florian Fainelli Committed by David S. Miller

net: dsa: Export suspend/resume functions

In preparation for allowing switch drivers to implement system-wide
suspend/resume functions, export dsa_switch_suspend and
dsa_switch_resume() such that these are callable from the appropriate
driver specific suspend/resume functions.
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Tested-by: default avatarVivien Didelot <vivien.didelot@savoirfairelinux.com>
Signed-off-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0ae940c7
...@@ -386,4 +386,18 @@ static inline bool dsa_uses_tagged_protocol(struct dsa_switch_tree *dst) ...@@ -386,4 +386,18 @@ static inline bool dsa_uses_tagged_protocol(struct dsa_switch_tree *dst)
void dsa_unregister_switch(struct dsa_switch *ds); void dsa_unregister_switch(struct dsa_switch *ds);
int dsa_register_switch(struct dsa_switch *ds, struct device_node *np); int dsa_register_switch(struct dsa_switch *ds, struct device_node *np);
#ifdef CONFIG_PM_SLEEP
int dsa_switch_suspend(struct dsa_switch *ds);
int dsa_switch_resume(struct dsa_switch *ds);
#else
static inline int dsa_switch_suspend(struct dsa_switch *ds)
{
return 0;
}
static inline int dsa_switch_resume(struct dsa_switch *ds)
{
return 0;
}
#endif /* CONFIG_PM_SLEEP */
#endif #endif
...@@ -543,7 +543,7 @@ static void dsa_switch_destroy(struct dsa_switch *ds) ...@@ -543,7 +543,7 @@ static void dsa_switch_destroy(struct dsa_switch *ds)
} }
#ifdef CONFIG_PM_SLEEP #ifdef CONFIG_PM_SLEEP
static int dsa_switch_suspend(struct dsa_switch *ds) int dsa_switch_suspend(struct dsa_switch *ds)
{ {
int i, ret = 0; int i, ret = 0;
...@@ -562,8 +562,9 @@ static int dsa_switch_suspend(struct dsa_switch *ds) ...@@ -562,8 +562,9 @@ static int dsa_switch_suspend(struct dsa_switch *ds)
return ret; return ret;
} }
EXPORT_SYMBOL_GPL(dsa_switch_suspend);
static int dsa_switch_resume(struct dsa_switch *ds) int dsa_switch_resume(struct dsa_switch *ds)
{ {
int i, ret = 0; int i, ret = 0;
...@@ -585,6 +586,7 @@ static int dsa_switch_resume(struct dsa_switch *ds) ...@@ -585,6 +586,7 @@ static int dsa_switch_resume(struct dsa_switch *ds)
return 0; return 0;
} }
EXPORT_SYMBOL_GPL(dsa_switch_resume);
#endif #endif
/* platform driver init and cleanup *****************************************/ /* platform driver init and cleanup *****************************************/
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment