diff options
Diffstat (limited to 'drivers/isdn/hisax/teles_cs.c')
-rw-r--r-- | drivers/isdn/hisax/teles_cs.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c index 040f098d4b26..ea16ebfc028a 100644 --- a/drivers/isdn/hisax/teles_cs.c +++ b/drivers/isdn/hisax/teles_cs.c | |||
@@ -112,7 +112,7 @@ static void teles_detach(struct pcmcia_device *p_dev); | |||
112 | */ | 112 | */ |
113 | 113 | ||
114 | typedef struct local_info_t { | 114 | typedef struct local_info_t { |
115 | dev_link_t link; | 115 | struct pcmcia_device *p_dev; |
116 | dev_node_t node; | 116 | dev_node_t node; |
117 | int busy; | 117 | int busy; |
118 | int cardnr; | 118 | int cardnr; |
@@ -132,8 +132,8 @@ typedef struct local_info_t { | |||
132 | 132 | ||
133 | static int teles_attach(struct pcmcia_device *p_dev) | 133 | static int teles_attach(struct pcmcia_device *p_dev) |
134 | { | 134 | { |
135 | dev_link_t *link; | ||
136 | local_info_t *local; | 135 | local_info_t *local; |
136 | dev_link_t *link = dev_to_instance(p_dev); | ||
137 | 137 | ||
138 | DEBUG(0, "teles_attach()\n"); | 138 | DEBUG(0, "teles_attach()\n"); |
139 | 139 | ||
@@ -142,7 +142,9 @@ static int teles_attach(struct pcmcia_device *p_dev) | |||
142 | if (!local) return -ENOMEM; | 142 | if (!local) return -ENOMEM; |
143 | memset(local, 0, sizeof(local_info_t)); | 143 | memset(local, 0, sizeof(local_info_t)); |
144 | local->cardnr = -1; | 144 | local->cardnr = -1; |
145 | link = &local->link; link->priv = local; | 145 | |
146 | local->p_dev = p_dev; | ||
147 | link->priv = local; | ||
146 | 148 | ||
147 | /* Interrupt setup */ | 149 | /* Interrupt setup */ |
148 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; | 150 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING|IRQ_FIRST_SHARED; |
@@ -163,9 +165,6 @@ static int teles_attach(struct pcmcia_device *p_dev) | |||
163 | link->conf.Attributes = CONF_ENABLE_IRQ; | 165 | link->conf.Attributes = CONF_ENABLE_IRQ; |
164 | link->conf.IntType = INT_MEMORY_AND_IO; | 166 | link->conf.IntType = INT_MEMORY_AND_IO; |
165 | 167 | ||
166 | link->handle = p_dev; | ||
167 | p_dev->instance = link; | ||
168 | |||
169 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 168 | link->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
170 | teles_cs_config(link); | 169 | teles_cs_config(link); |
171 | 170 | ||
@@ -311,7 +310,7 @@ static void teles_cs_config(dev_link_t *link) | |||
311 | sprintf(dev->node.dev_name, "teles"); | 310 | sprintf(dev->node.dev_name, "teles"); |
312 | dev->node.major = dev->node.minor = 0x0; | 311 | dev->node.major = dev->node.minor = 0x0; |
313 | 312 | ||
314 | link->dev = &dev->node; | 313 | link->dev_node = &dev->node; |
315 | 314 | ||
316 | /* Finally, report what we've done */ | 315 | /* Finally, report what we've done */ |
317 | printk(KERN_INFO "%s: index 0x%02x:", | 316 | printk(KERN_INFO "%s: index 0x%02x:", |