aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/spectrum_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-01 18:02:33 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:15:52 -0500
commit8661bb5b4af1849c1f5a4e80c4e275fd13c155d6 (patch)
treead99d85ea8d6f5c4c99b93f869bfd412994fb4ee /drivers/net/wireless/spectrum_cs.c
parent50db3fdbbc98260fb538c1cc3f8cc597ba7bffe7 (diff)
[PATCH] pcmcia: default suspend and resume handling
In all but one case, the suspend and resume functions of PCMCIA drivers contain mostly of calls to pcmcia_release_configuration() and pcmcia_request_configuration(). Therefore, move this code out of the drivers and into the core. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net/wireless/spectrum_cs.c')
-rw-r--r--drivers/net/wireless/spectrum_cs.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/net/wireless/spectrum_cs.c b/drivers/net/wireless/spectrum_cs.c
index b7ed99f8d319..0429f1dc7fad 100644
--- a/drivers/net/wireless/spectrum_cs.c
+++ b/drivers/net/wireless/spectrum_cs.c
@@ -908,7 +908,6 @@ spectrum_cs_suspend(struct pcmcia_device *p_dev)
908 unsigned long flags; 908 unsigned long flags;
909 int err = 0; 909 int err = 0;
910 910
911 link->state |= DEV_SUSPEND;
912 /* Mark the device as stopped, to block IO until later */ 911 /* Mark the device as stopped, to block IO until later */
913 if (link->state & DEV_CONFIG) { 912 if (link->state & DEV_CONFIG) {
914 spin_lock_irqsave(&priv->lock, flags); 913 spin_lock_irqsave(&priv->lock, flags);
@@ -922,8 +921,6 @@ spectrum_cs_suspend(struct pcmcia_device *p_dev)
922 priv->hw_unavailable++; 921 priv->hw_unavailable++;
923 922
924 spin_unlock_irqrestore(&priv->lock, flags); 923 spin_unlock_irqrestore(&priv->lock, flags);
925
926 pcmcia_release_configuration(link->handle);
927 } 924 }
928 925
929 return 0; 926 return 0;
@@ -936,11 +933,7 @@ spectrum_cs_resume(struct pcmcia_device *p_dev)
936 struct net_device *dev = link->priv; 933 struct net_device *dev = link->priv;
937 struct orinoco_private *priv = netdev_priv(dev); 934 struct orinoco_private *priv = netdev_priv(dev);
938 935
939 link->state &= ~DEV_SUSPEND;
940 if (link->state & DEV_CONFIG) { 936 if (link->state & DEV_CONFIG) {
941 /* FIXME: should we double check that this is
942 * the same card as we had before */
943 pcmcia_request_configuration(link->handle, &link->conf);
944 netif_device_attach(dev); 937 netif_device_attach(dev);
945 priv->hw_unavailable--; 938 priv->hw_unavailable--;
946 schedule_work(&priv->reset_work); 939 schedule_work(&priv->reset_work);