diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-01 18:02:33 -0500 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 10:15:52 -0500 |
commit | 8661bb5b4af1849c1f5a4e80c4e275fd13c155d6 (patch) | |
tree | ad99d85ea8d6f5c4c99b93f869bfd412994fb4ee /drivers/net/wireless/atmel_cs.c | |
parent | 50db3fdbbc98260fb538c1cc3f8cc597ba7bffe7 (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/atmel_cs.c')
-rw-r--r-- | drivers/net/wireless/atmel_cs.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c index 1da8e6197ffb..89dbc783ff80 100644 --- a/drivers/net/wireless/atmel_cs.c +++ b/drivers/net/wireless/atmel_cs.c | |||
@@ -433,11 +433,8 @@ static int atmel_suspend(struct pcmcia_device *dev) | |||
433 | dev_link_t *link = dev_to_instance(dev); | 433 | dev_link_t *link = dev_to_instance(dev); |
434 | local_info_t *local = link->priv; | 434 | local_info_t *local = link->priv; |
435 | 435 | ||
436 | link->state |= DEV_SUSPEND; | 436 | if (link->state & DEV_CONFIG) |
437 | if (link->state & DEV_CONFIG) { | ||
438 | netif_device_detach(local->eth_dev); | 437 | netif_device_detach(local->eth_dev); |
439 | pcmcia_release_configuration(link->handle); | ||
440 | } | ||
441 | 438 | ||
442 | return 0; | 439 | return 0; |
443 | } | 440 | } |
@@ -447,9 +444,7 @@ static int atmel_resume(struct pcmcia_device *dev) | |||
447 | dev_link_t *link = dev_to_instance(dev); | 444 | dev_link_t *link = dev_to_instance(dev); |
448 | local_info_t *local = link->priv; | 445 | local_info_t *local = link->priv; |
449 | 446 | ||
450 | link->state &= ~DEV_SUSPEND; | ||
451 | if (link->state & DEV_CONFIG) { | 447 | if (link->state & DEV_CONFIG) { |
452 | pcmcia_request_configuration(link->handle, &link->conf); | ||
453 | atmel_open(local->eth_dev); | 448 | atmel_open(local->eth_dev); |
454 | netif_device_attach(local->eth_dev); | 449 | netif_device_attach(local->eth_dev); |
455 | } | 450 | } |