aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hisax/elsa_cs.c
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2006-03-05 04:45:09 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2006-03-31 10:15:57 -0500
commitfd238232cd0ff4840ae6946bb338502154096d88 (patch)
treed20e8f5871f7cff9d0867a84f6ba088fbffcbe28 /drivers/isdn/hisax/elsa_cs.c
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/isdn/hisax/elsa_cs.c')
-rw-r--r--drivers/isdn/hisax/elsa_cs.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index 00835d537c10..bcda675e9103 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -121,7 +121,7 @@ static void elsa_cs_detach(struct pcmcia_device *p_dev);
121*/ 121*/
122 122
123typedef struct local_info_t { 123typedef struct local_info_t {
124 dev_link_t link; 124 struct pcmcia_device *p_dev;
125 dev_node_t node; 125 dev_node_t node;
126 int busy; 126 int busy;
127 int cardnr; 127 int cardnr;
@@ -141,8 +141,8 @@ typedef struct local_info_t {
141 141
142static int elsa_cs_attach(struct pcmcia_device *p_dev) 142static int elsa_cs_attach(struct pcmcia_device *p_dev)
143{ 143{
144 dev_link_t *link;
145 local_info_t *local; 144 local_info_t *local;
145 dev_link_t *link = dev_to_instance(p_dev);
146 146
147 DEBUG(0, "elsa_cs_attach()\n"); 147 DEBUG(0, "elsa_cs_attach()\n");
148 148
@@ -150,8 +150,11 @@ static int elsa_cs_attach(struct pcmcia_device *p_dev)
150 local = kmalloc(sizeof(local_info_t), GFP_KERNEL); 150 local = kmalloc(sizeof(local_info_t), GFP_KERNEL);
151 if (!local) return -ENOMEM; 151 if (!local) return -ENOMEM;
152 memset(local, 0, sizeof(local_info_t)); 152 memset(local, 0, sizeof(local_info_t));
153
154 local->p_dev = p_dev;
155 link->priv = local;
156
153 local->cardnr = -1; 157 local->cardnr = -1;
154 link = &local->link; link->priv = local;
155 158
156 /* Interrupt setup */ 159 /* Interrupt setup */
157 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; 160 link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED;
@@ -172,9 +175,6 @@ static int elsa_cs_attach(struct pcmcia_device *p_dev)
172 link->conf.Attributes = CONF_ENABLE_IRQ; 175 link->conf.Attributes = CONF_ENABLE_IRQ;
173 link->conf.IntType = INT_MEMORY_AND_IO; 176 link->conf.IntType = INT_MEMORY_AND_IO;
174 177
175 link->handle = p_dev;
176 p_dev->instance = link;
177
178 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; 178 link->state |= DEV_PRESENT | DEV_CONFIG_PENDING;
179 elsa_cs_config(link); 179 elsa_cs_config(link);
180 180
@@ -320,7 +320,7 @@ static void elsa_cs_config(dev_link_t *link)
320 sprintf(dev->node.dev_name, "elsa"); 320 sprintf(dev->node.dev_name, "elsa");
321 dev->node.major = dev->node.minor = 0x0; 321 dev->node.major = dev->node.minor = 0x0;
322 322
323 link->dev = &dev->node; 323 link->dev_node = &dev->node;
324 324
325 /* Finally, report what we've done */ 325 /* Finally, report what we've done */
326 printk(KERN_INFO "%s: index 0x%02x: ", 326 printk(KERN_INFO "%s: index 0x%02x: ",