diff options
Diffstat (limited to 'drivers/isdn/hisax/teles_cs.c')
-rw-r--r-- | drivers/isdn/hisax/teles_cs.c | 50 |
1 files changed, 5 insertions, 45 deletions
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c index d010a0da8e19..5771955cc532 100644 --- a/drivers/isdn/hisax/teles_cs.c +++ b/drivers/isdn/hisax/teles_cs.c | |||
@@ -68,34 +68,8 @@ static void teles_cs_release(struct pcmcia_device *link); | |||
68 | 68 | ||
69 | static void teles_detach(struct pcmcia_device *p_dev) __devexit ; | 69 | static void teles_detach(struct pcmcia_device *p_dev) __devexit ; |
70 | 70 | ||
71 | /* | ||
72 | A linked list of "instances" of the teles_cs device. Each actual | ||
73 | PCMCIA card corresponds to one device instance, and is described | ||
74 | by one struct pcmcia_device structure (defined in ds.h). | ||
75 | |||
76 | You may not want to use a linked list for this -- for example, the | ||
77 | memory card driver uses an array of struct pcmcia_device pointers, where minor | ||
78 | device numbers are used to derive the corresponding array index. | ||
79 | */ | ||
80 | |||
81 | /* | ||
82 | A driver needs to provide a dev_node_t structure for each device | ||
83 | on a card. In some cases, there is only one device per card (for | ||
84 | example, ethernet cards, modems). In other cases, there may be | ||
85 | many actual or logical devices (SCSI adapters, memory cards with | ||
86 | multiple partitions). The dev_node_t structures need to be kept | ||
87 | in a linked list starting at the 'dev' field of a struct pcmcia_device | ||
88 | structure. We allocate them in the card's private data structure, | ||
89 | because they generally shouldn't be allocated dynamically. | ||
90 | In this case, we also provide a flag to indicate if a device is | ||
91 | "stopped" due to a power management event, or card ejection. The | ||
92 | device IO routines can use a flag like this to throttle IO to a | ||
93 | card that is not ready to accept it. | ||
94 | */ | ||
95 | |||
96 | typedef struct local_info_t { | 71 | typedef struct local_info_t { |
97 | struct pcmcia_device *p_dev; | 72 | struct pcmcia_device *p_dev; |
98 | dev_node_t node; | ||
99 | int busy; | 73 | int busy; |
100 | int cardnr; | 74 | int cardnr; |
101 | } local_info_t; | 75 | } local_info_t; |
@@ -126,10 +100,6 @@ static int __devinit teles_probe(struct pcmcia_device *link) | |||
126 | local->p_dev = link; | 100 | local->p_dev = link; |
127 | link->priv = local; | 101 | link->priv = local; |
128 | 102 | ||
129 | /* Interrupt setup */ | ||
130 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
131 | link->irq.Handler = NULL; | ||
132 | |||
133 | /* | 103 | /* |
134 | General socket configuration defaults can go here. In this | 104 | General socket configuration defaults can go here. In this |
135 | client, we assume very little, and rely on the CIS for almost | 105 | client, we assume very little, and rely on the CIS for almost |
@@ -213,28 +183,18 @@ static int __devinit teles_cs_config(struct pcmcia_device *link) | |||
213 | if (i != 0) | 183 | if (i != 0) |
214 | goto cs_failed; | 184 | goto cs_failed; |
215 | 185 | ||
216 | i = pcmcia_request_irq(link, &link->irq); | 186 | if (!link->irq) |
217 | if (i != 0) { | ||
218 | link->irq.AssignedIRQ = 0; | ||
219 | goto cs_failed; | 187 | goto cs_failed; |
220 | } | ||
221 | 188 | ||
222 | i = pcmcia_request_configuration(link, &link->conf); | 189 | i = pcmcia_request_configuration(link, &link->conf); |
223 | if (i != 0) | 190 | if (i != 0) |
224 | goto cs_failed; | 191 | goto cs_failed; |
225 | 192 | ||
226 | /* At this point, the dev_node_t structure(s) should be | ||
227 | initialized and arranged in a linked list at link->dev. *//* */ | ||
228 | sprintf(dev->node.dev_name, "teles"); | ||
229 | dev->node.major = dev->node.minor = 0x0; | ||
230 | |||
231 | link->dev_node = &dev->node; | ||
232 | |||
233 | /* Finally, report what we've done */ | 193 | /* Finally, report what we've done */ |
234 | printk(KERN_INFO "%s: index 0x%02x:", | 194 | dev_info(&link->dev, "index 0x%02x:", |
235 | dev->node.dev_name, link->conf.ConfigIndex); | 195 | link->conf.ConfigIndex); |
236 | if (link->conf.Attributes & CONF_ENABLE_IRQ) | 196 | if (link->conf.Attributes & CONF_ENABLE_IRQ) |
237 | printk(", irq %d", link->irq.AssignedIRQ); | 197 | printk(", irq %d", link->irq); |
238 | if (link->io.NumPorts1) | 198 | if (link->io.NumPorts1) |
239 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, | 199 | printk(", io 0x%04x-0x%04x", link->io.BasePort1, |
240 | link->io.BasePort1+link->io.NumPorts1-1); | 200 | link->io.BasePort1+link->io.NumPorts1-1); |
@@ -243,7 +203,7 @@ static int __devinit teles_cs_config(struct pcmcia_device *link) | |||
243 | link->io.BasePort2+link->io.NumPorts2-1); | 203 | link->io.BasePort2+link->io.NumPorts2-1); |
244 | printk("\n"); | 204 | printk("\n"); |
245 | 205 | ||
246 | icard.para[0] = link->irq.AssignedIRQ; | 206 | icard.para[0] = link->irq; |
247 | icard.para[1] = link->io.BasePort1; | 207 | icard.para[1] = link->io.BasePort1; |
248 | icard.protocol = protocol; | 208 | icard.protocol = protocol; |
249 | icard.typ = ISDN_CTYPE_TELESPCMCIA; | 209 | icard.typ = ISDN_CTYPE_TELESPCMCIA; |