aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@rpsys.net>2005-10-30 09:38:52 -0500
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-10-30 09:38:52 -0500
commit91e1a512291f258746611c18ec4970a81c9f311b (patch)
tree1005eb3a28ba9059d2439c6ddc7dd75857f680fe
parent9f75e1eff3edb2bb07349b94c28f4f2a6c66ca43 (diff)
[ARM] 3066/1: Fix PXA irda driver suspend/resume functions
Patch from Richard Purdie Update the PXA irda driver to match the recent platform device suspend/resume level changes. Signed-off-by: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
-rw-r--r--drivers/net/irda/pxaficp_ir.c14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/irda/pxaficp_ir.c b/drivers/net/irda/pxaficp_ir.c
index aef80f5e7c9c..b886b07412a6 100644
--- a/drivers/net/irda/pxaficp_ir.c
+++ b/drivers/net/irda/pxaficp_ir.c
@@ -704,15 +704,12 @@ static int pxa_irda_stop(struct net_device *dev)
704 return 0; 704 return 0;
705} 705}
706 706
707static int pxa_irda_suspend(struct device *_dev, pm_message_t state, u32 level) 707static int pxa_irda_suspend(struct device *_dev, pm_message_t state)
708{ 708{
709 struct net_device *dev = dev_get_drvdata(_dev); 709 struct net_device *dev = dev_get_drvdata(_dev);
710 struct pxa_irda *si; 710 struct pxa_irda *si;
711 711
712 if (!dev || level != SUSPEND_DISABLE) 712 if (dev && netif_running(dev)) {
713 return 0;
714
715 if (netif_running(dev)) {
716 si = netdev_priv(dev); 713 si = netdev_priv(dev);
717 netif_device_detach(dev); 714 netif_device_detach(dev);
718 pxa_irda_shutdown(si); 715 pxa_irda_shutdown(si);
@@ -721,15 +718,12 @@ static int pxa_irda_suspend(struct device *_dev, pm_message_t state, u32 level)
721 return 0; 718 return 0;
722} 719}
723 720
724static int pxa_irda_resume(struct device *_dev, u32 level) 721static int pxa_irda_resume(struct device *_dev)
725{ 722{
726 struct net_device *dev = dev_get_drvdata(_dev); 723 struct net_device *dev = dev_get_drvdata(_dev);
727 struct pxa_irda *si; 724 struct pxa_irda *si;
728 725
729 if (!dev || level != RESUME_ENABLE) 726 if (dev && netif_running(dev)) {
730 return 0;
731
732 if (netif_running(dev)) {
733 si = netdev_priv(dev); 727 si = netdev_priv(dev);
734 pxa_irda_startup(si); 728 pxa_irda_startup(si);
735 netif_device_attach(dev); 729 netif_device_attach(dev);