diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-05 10:45:09 +0100 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2006-03-31 17:15:57 +0200 |
commit | fd238232cd0ff4840ae6946bb338502154096d88 (patch) | |
tree | d20e8f5871f7cff9d0867a84f6ba088fbffcbe28 /drivers/parport/parport_cs.c | |
parent | a78f4dd331a4f6a396eb5849656a4a72a70a56d7 (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/parport/parport_cs.c')
-rw-r--r-- | drivers/parport/parport_cs.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c index 8d60146c721..ad2738ae222 100644 --- a/drivers/parport/parport_cs.c +++ b/drivers/parport/parport_cs.c @@ -81,7 +81,7 @@ static char *version = #define FORCE_EPP_MODE 0x08 typedef struct parport_info_t { - dev_link_t link; + struct pcmcia_device *p_dev; int ndev; dev_node_t node; struct parport *port; @@ -102,7 +102,7 @@ static void parport_cs_release(dev_link_t *); static int parport_attach(struct pcmcia_device *p_dev) { parport_info_t *info; - dev_link_t *link; + dev_link_t *link = dev_to_instance(p_dev); DEBUG(0, "parport_attach()\n"); @@ -110,7 +110,8 @@ static int parport_attach(struct pcmcia_device *p_dev) info = kmalloc(sizeof(*info), GFP_KERNEL); if (!info) return -ENOMEM; memset(info, 0, sizeof(*info)); - link = &info->link; link->priv = info; + link->priv = info; + info->p_dev = p_dev; link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; link->io.Attributes2 = IO_DATA_PATH_WIDTH_8; @@ -119,9 +120,6 @@ static int parport_attach(struct pcmcia_device *p_dev) link->conf.Attributes = CONF_ENABLE_IRQ; link->conf.IntType = INT_MEMORY_AND_IO; - link->handle = p_dev; - p_dev->instance = link; - link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; parport_config(link); @@ -239,7 +237,7 @@ void parport_config(dev_link_t *link) info->node.minor = p->number; info->port = p; strcpy(info->node.dev_name, p->name); - link->dev = &info->node; + link->dev_node = &info->node; link->state &= ~DEV_CONFIG_PENDING; return; |