diff options
Diffstat (limited to 'drivers/isdn/hardware/avm/avm_cs.c')
-rw-r--r-- | drivers/isdn/hardware/avm/avm_cs.c | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c index c9c794e2926d..28f9211726c5 100644 --- a/drivers/isdn/hardware/avm/avm_cs.c +++ b/drivers/isdn/hardware/avm/avm_cs.c | |||
@@ -51,7 +51,7 @@ MODULE_LICENSE("GPL"); | |||
51 | handler. | 51 | handler. |
52 | */ | 52 | */ |
53 | 53 | ||
54 | static void avmcs_config(struct pcmcia_device *link); | 54 | static int avmcs_config(struct pcmcia_device *link); |
55 | static void avmcs_release(struct pcmcia_device *link); | 55 | static void avmcs_release(struct pcmcia_device *link); |
56 | 56 | ||
57 | /* | 57 | /* |
@@ -99,7 +99,7 @@ typedef struct local_info_t { | |||
99 | 99 | ||
100 | ======================================================================*/ | 100 | ======================================================================*/ |
101 | 101 | ||
102 | static int avmcs_attach(struct pcmcia_device *p_dev) | 102 | static int avmcs_probe(struct pcmcia_device *p_dev) |
103 | { | 103 | { |
104 | local_info_t *local; | 104 | local_info_t *local; |
105 | 105 | ||
@@ -128,12 +128,10 @@ static int avmcs_attach(struct pcmcia_device *p_dev) | |||
128 | p_dev->priv = local; | 128 | p_dev->priv = local; |
129 | 129 | ||
130 | p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING; | 130 | p_dev->state |= DEV_PRESENT | DEV_CONFIG_PENDING; |
131 | avmcs_config(p_dev); | 131 | return avmcs_config(p_dev); |
132 | |||
133 | return 0; | ||
134 | 132 | ||
135 | err: | 133 | err: |
136 | return -EINVAL; | 134 | return -ENOMEM; |
137 | } /* avmcs_attach */ | 135 | } /* avmcs_attach */ |
138 | 136 | ||
139 | /*====================================================================== | 137 | /*====================================================================== |
@@ -185,7 +183,7 @@ static int next_tuple(struct pcmcia_device *handle, tuple_t *tuple, | |||
185 | return get_tuple(handle, tuple, parse); | 183 | return get_tuple(handle, tuple, parse); |
186 | } | 184 | } |
187 | 185 | ||
188 | static void avmcs_config(struct pcmcia_device *link) | 186 | static int avmcs_config(struct pcmcia_device *link) |
189 | { | 187 | { |
190 | tuple_t tuple; | 188 | tuple_t tuple; |
191 | cisparse_t parse; | 189 | cisparse_t parse; |
@@ -219,7 +217,7 @@ static void avmcs_config(struct pcmcia_device *link) | |||
219 | if (i != CS_SUCCESS) { | 217 | if (i != CS_SUCCESS) { |
220 | cs_error(link, ParseTuple, i); | 218 | cs_error(link, ParseTuple, i); |
221 | link->state &= ~DEV_CONFIG_PENDING; | 219 | link->state &= ~DEV_CONFIG_PENDING; |
222 | return; | 220 | return -ENODEV; |
223 | } | 221 | } |
224 | 222 | ||
225 | /* Configure card */ | 223 | /* Configure card */ |
@@ -319,7 +317,7 @@ found_port: | |||
319 | /* If any step failed, release any partially configured state */ | 317 | /* If any step failed, release any partially configured state */ |
320 | if (i != 0) { | 318 | if (i != 0) { |
321 | avmcs_release(link); | 319 | avmcs_release(link); |
322 | return; | 320 | return -ENODEV; |
323 | } | 321 | } |
324 | 322 | ||
325 | 323 | ||
@@ -333,9 +331,10 @@ found_port: | |||
333 | printk(KERN_ERR "avm_cs: failed to add AVM-%s-Controller at i/o %#x, irq %d\n", | 331 | printk(KERN_ERR "avm_cs: failed to add AVM-%s-Controller at i/o %#x, irq %d\n", |
334 | dev->node.dev_name, link->io.BasePort1, link->irq.AssignedIRQ); | 332 | dev->node.dev_name, link->io.BasePort1, link->irq.AssignedIRQ); |
335 | avmcs_release(link); | 333 | avmcs_release(link); |
336 | return; | 334 | return -ENODEV; |
337 | } | 335 | } |
338 | dev->node.minor = i; | 336 | dev->node.minor = i; |
337 | return 0; | ||
339 | 338 | ||
340 | } /* avmcs_config */ | 339 | } /* avmcs_config */ |
341 | 340 | ||
@@ -367,7 +366,7 @@ static struct pcmcia_driver avmcs_driver = { | |||
367 | .drv = { | 366 | .drv = { |
368 | .name = "avm_cs", | 367 | .name = "avm_cs", |
369 | }, | 368 | }, |
370 | .probe = avmcs_attach, | 369 | .probe = avmcs_probe, |
371 | .remove = avmcs_detach, | 370 | .remove = avmcs_detach, |
372 | .id_table = avmcs_ids, | 371 | .id_table = avmcs_ids, |
373 | }; | 372 | }; |