aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/irda
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:48:00 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2005-10-30 20:48:00 -0500
commit1480d0a31db62b9803f829cc0e5cc71935ffe3cc (patch)
treec7c18939b5a0d51f23f7ca8606ecf00fa69741aa /drivers/net/irda
parentfc8e3d177fa8073895d37b50282489dbeec89eb1 (diff)
parent46595ffbfc8ba79f27cdf8a029ee068b3b34c69f (diff)
Merge master.kernel.org:/home/rmk/linux-2.6-arm
Diffstat (limited to 'drivers/net/irda')
-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);