summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/ray_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/ray_cs.c')
-rw-r--r--drivers/net/wireless/ray_cs.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index fc81ac67009..ed4bf5013f1 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -868,14 +868,8 @@ static int ray_suspend(struct pcmcia_device *p_dev)
dev_link_t *link = dev_to_instance(p_dev);
struct net_device *dev = link->priv;
- link->state |= DEV_SUSPEND;
- if (link->state & DEV_CONFIG) {
- if (link->open)
- netif_device_detach(dev);
-
- pcmcia_release_configuration(link->handle);
- }
-
+ if ((link->state & DEV_CONFIG) && (link->open))
+ netif_device_detach(dev);
return 0;
}
@@ -885,14 +879,10 @@ static int ray_resume(struct pcmcia_device *p_dev)
dev_link_t *link = dev_to_instance(p_dev);
struct net_device *dev = link->priv;
- link->state &= ~DEV_SUSPEND;
- if (link->state & DEV_CONFIG) {
- pcmcia_request_configuration(link->handle, &link->conf);
- if (link->open) {
- ray_reset(dev);
- netif_device_attach(dev);
- }
- }
+ if ((link->state & DEV_CONFIG) && (link->open)) {
+ ray_reset(dev);
+ netif_device_attach(dev);
+ }
return 0;
}