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/orinoco_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/orinoco_cs.c')
-rw-r--r-- | drivers/net/wireless/orinoco_cs.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/drivers/net/wireless/orinoco_cs.c b/drivers/net/wireless/orinoco_cs.c index 0ce4165efc8f..89e16cd1be8c 100644 --- a/drivers/net/wireless/orinoco_cs.c +++ b/drivers/net/wireless/orinoco_cs.c | |||
@@ -429,7 +429,6 @@ static int orinoco_cs_suspend(struct pcmcia_device *p_dev) | |||
429 | int err = 0; | 429 | int err = 0; |
430 | unsigned long flags; | 430 | unsigned long flags; |
431 | 431 | ||
432 | link->state |= DEV_SUSPEND; | ||
433 | if (link->state & DEV_CONFIG) { | 432 | if (link->state & DEV_CONFIG) { |
434 | /* This is probably racy, but I can't think of | 433 | /* This is probably racy, but I can't think of |
435 | a better way, short of rewriting the PCMCIA | 434 | a better way, short of rewriting the PCMCIA |
@@ -447,8 +446,6 @@ static int orinoco_cs_suspend(struct pcmcia_device *p_dev) | |||
447 | 446 | ||
448 | spin_unlock_irqrestore(&priv->lock, flags); | 447 | spin_unlock_irqrestore(&priv->lock, flags); |
449 | } | 448 | } |
450 | |||
451 | pcmcia_release_configuration(link->handle); | ||
452 | } | 449 | } |
453 | 450 | ||
454 | return 0; | 451 | return 0; |
@@ -463,12 +460,7 @@ static int orinoco_cs_resume(struct pcmcia_device *p_dev) | |||
463 | int err = 0; | 460 | int err = 0; |
464 | unsigned long flags; | 461 | unsigned long flags; |
465 | 462 | ||
466 | link->state &= ~DEV_SUSPEND; | ||
467 | if (link->state & DEV_CONFIG) { | 463 | if (link->state & DEV_CONFIG) { |
468 | /* FIXME: should we double check that this is | ||
469 | * the same card as we had before */ | ||
470 | pcmcia_request_configuration(link->handle, &link->conf); | ||
471 | |||
472 | if (! test_bit(0, &card->hard_reset_in_progress)) { | 464 | if (! test_bit(0, &card->hard_reset_in_progress)) { |
473 | err = orinoco_reinit_firmware(dev); | 465 | err = orinoco_reinit_firmware(dev); |
474 | if (err) { | 466 | if (err) { |