aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/isdn/hardware/avm/avm_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/isdn/hardware/avm/avm_cs.c')
-rw-r--r--drivers/isdn/hardware/avm/avm_cs.c17
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index 94b796d8405..0d485f6c219 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_cs.c
@@ -107,9 +107,6 @@ static int avmcs_probe(struct pcmcia_device *p_dev)
107 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8; 107 p_dev->io.Attributes1 = IO_DATA_PATH_WIDTH_8;
108 p_dev->io.NumPorts2 = 0; 108 p_dev->io.NumPorts2 = 0;
109 109
110 /* Interrupt setup */
111 p_dev->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING;
112
113 /* General socket configuration */ 110 /* General socket configuration */
114 p_dev->conf.Attributes = CONF_ENABLE_IRQ; 111 p_dev->conf.Attributes = CONF_ENABLE_IRQ;
115 p_dev->conf.IntType = INT_MEMORY_AND_IO; 112 p_dev->conf.IntType = INT_MEMORY_AND_IO;
@@ -172,7 +169,7 @@ static int avmcs_configcheck(struct pcmcia_device *p_dev,
172static int avmcs_config(struct pcmcia_device *link) 169static int avmcs_config(struct pcmcia_device *link)
173{ 170{
174 local_info_t *dev; 171 local_info_t *dev;
175 int i; 172 int i = -1;
176 char devname[128]; 173 char devname[128];
177 int cardtype; 174 int cardtype;
178 int (*addcard)(unsigned int port, unsigned irq); 175 int (*addcard)(unsigned int port, unsigned irq);
@@ -190,11 +187,7 @@ static int avmcs_config(struct pcmcia_device *link)
190 return -ENODEV; 187 return -ENODEV;
191 188
192 do { 189 do {
193 /* 190 if (!link->irq) {
194 * allocate an interrupt line
195 */
196 i = pcmcia_request_irq(link, &link->irq);
197 if (i != 0) {
198 /* undo */ 191 /* undo */
199 pcmcia_disable_device(link); 192 pcmcia_disable_device(link);
200 break; 193 break;
@@ -249,9 +242,9 @@ static int avmcs_config(struct pcmcia_device *link)
249 default: 242 default:
250 case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break; 243 case AVM_CARDTYPE_B1: addcard = b1pcmcia_addcard_b1; break;
251 } 244 }
252 if ((i = (*addcard)(link->io.BasePort1, link->irq.AssignedIRQ)) < 0) { 245 if ((i = (*addcard)(link->io.BasePort1, link->irq)) < 0) {
253 printk(KERN_ERR "avm_cs: failed to add AVM-%s-Controller at i/o %#x, irq %d\n", 246 printk(KERN_ERR "avm_cs: failed to add AVM-%s-Controller at i/o %#x, irq %d\n",
254 dev->node.dev_name, link->io.BasePort1, link->irq.AssignedIRQ); 247 dev->node.dev_name, link->io.BasePort1, link->irq);
255 avmcs_release(link); 248 avmcs_release(link);
256 return -ENODEV; 249 return -ENODEV;
257 } 250 }
@@ -270,7 +263,7 @@ static int avmcs_config(struct pcmcia_device *link)
270 263
271static void avmcs_release(struct pcmcia_device *link) 264static void avmcs_release(struct pcmcia_device *link)
272{ 265{
273 b1pcmcia_delcard(link->io.BasePort1, link->irq.AssignedIRQ); 266 b1pcmcia_delcard(link->io.BasePort1, link->irq);
274 pcmcia_disable_device(link); 267 pcmcia_disable_device(link);
275} /* avmcs_release */ 268} /* avmcs_release */
276 269