summaryrefslogtreecommitdiff
path: root/drivers/serial
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-02 00:02:33 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 17:15:52 +0200
commit8661bb5b4af1849c1f5a4e80c4e275fd13c155d6 (patch)
treead99d85ea8d6f5c4c99b93f869bfd412994fb4ee /drivers/serial
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/serial')
-rw-r--r--drivers/serial/serial_cs.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index ff38820a03f5..b6b460fa693f 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]);
}