summaryrefslogtreecommitdiffstats
path: root/drivers/serial
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-05 10:45:09 +0100
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 17:15:57 +0200
commitfd238232cd0ff4840ae6946bb338502154096d88 (patch)
treed20e8f5871f7cff9d0867a84f6ba088fbffcbe28 /drivers/serial
parenta78f4dd331a4f6a396eb5849656a4a72a70a56d7 (diff)
[PATCH] pcmcia: embed dev_link_t into struct pcmcia_device
Embed dev_link_t into struct pcmcia_device(), as they basically address the same entity. The actual contents of dev_link_t will be cleaned up step by step. This patch includes a bugfix from and signed-off-by Andrew Morton. Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/serial')
-rw-r--r--drivers/serial/serial_cs.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 1e6889f52b3..6bcde2c7b15 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -97,7 +97,7 @@ static const struct multi_id multi_id[] = {
#define MULTI_COUNT (sizeof(multi_id)/sizeof(struct multi_id))
struct serial_info {
- dev_link_t link;
+ struct pcmcia_device *p_dev;
int ndev;
int multi;
int slave;
@@ -135,16 +135,16 @@ static void serial_remove(dev_link_t *link)
/*
* Recheck to see if the device is still configured.
*/
- if (info->link.state & DEV_CONFIG) {
+ if (info->p_dev->state & DEV_CONFIG) {
for (i = 0; i < info->ndev; i++)
serial8250_unregister_port(info->line[i]);
- info->link.dev = NULL;
+ info->p_dev->dev_node = NULL;
if (!info->slave)
pcmcia_disable_device(link->handle);
- info->link.state &= ~DEV_CONFIG;
+ info->p_dev->state &= ~DEV_CONFIG;
}
}
@@ -192,7 +192,7 @@ static int serial_resume(struct pcmcia_device *dev)
static int serial_probe(struct pcmcia_device *p_dev)
{
struct serial_info *info;
- dev_link_t *link;
+ dev_link_t *link = dev_to_instance(p_dev);
DEBUG(0, "serial_attach()\n");
@@ -201,7 +201,7 @@ static int serial_probe(struct pcmcia_device *p_dev)
if (!info)
return -ENOMEM;
memset(info, 0, sizeof (*info));
- link = &info->link;
+ info->p_dev = p_dev;
link->priv = info;
link->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
@@ -215,8 +215,6 @@ static int serial_probe(struct pcmcia_device *p_dev)
}
link->conf.IntType = INT_MEMORY_AND_IO;
- link->handle = p_dev;
- p_dev->instance = link;
link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
serial_config(link);
@@ -660,7 +658,7 @@ void serial_config(dev_link_t * link)
}
}
- link->dev = &info->node[0];
+ link->dev_node = &info->node[0];
link->state &= ~DEV_CONFIG_PENDING;
kfree(cfg_mem);
return;