diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-01 23:02:33 (GMT) |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 15:15:52 (GMT) |
commit | 8661bb5b4af1849c1f5a4e80c4e275fd13c155d6 (patch) | |
tree | ad99d85ea8d6f5c4c99b93f869bfd412994fb4ee /drivers/serial/serial_cs.c | |
parent | 50db3fdbbc98260fb538c1cc3f8cc597ba7bffe7 (diff) | |
download | linux-8661bb5b4af1849c1f5a4e80c4e275fd13c155d6.tar.xz |
[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/serial/serial_cs.c')
-rw-r--r-- | drivers/serial/serial_cs.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index ff38820..b6b460f 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c @@ -151,7 +151,6 @@ static void serial_remove(dev_link_t *link) static int serial_suspend(struct pcmcia_device *dev) { dev_link_t *link = dev_to_instance(dev); - link->state |= DEV_SUSPEND; if (link->state & DEV_CONFIG) { struct serial_info *info = link->priv; @@ -160,8 +159,8 @@ static int serial_suspend(struct pcmcia_device *dev) for (i = 0; i < info->ndev; i++) serial8250_suspend_port(info->line[i]); - if (!info->slave) - pcmcia_release_configuration(link->handle); + if (info->slave) + link->state &= DEV_SUSPEND_NORELEASE; } return 0; @@ -170,15 +169,11 @@ static int serial_suspend(struct pcmcia_device *dev) static int serial_resume(struct pcmcia_device *dev) { dev_link_t *link = dev_to_instance(dev); - link->state &= ~DEV_SUSPEND; if (DEV_OK(link)) { struct serial_info *info = link->priv; int i; - if (!info->slave) - pcmcia_request_configuration(link->handle, &link->conf); - for (i = 0; i < info->ndev; i++) serial8250_resume_port(info->line[i]); } |