diff options
Diffstat (limited to 'drivers/net/pcmcia/com20020_cs.c')
-rw-r--r-- | drivers/net/pcmcia/com20020_cs.c | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c index a9bcfb4ba15e..a7d675bc6051 100644 --- a/drivers/net/pcmcia/com20020_cs.c +++ b/drivers/net/pcmcia/com20020_cs.c | |||
@@ -118,7 +118,7 @@ MODULE_LICENSE("GPL"); | |||
118 | 118 | ||
119 | /*====================================================================*/ | 119 | /*====================================================================*/ |
120 | 120 | ||
121 | static void com20020_config(struct pcmcia_device *link); | 121 | static int com20020_config(struct pcmcia_device *link); |
122 | static void com20020_release(struct pcmcia_device *link); | 122 | static void com20020_release(struct pcmcia_device *link); |
123 | 123 | ||
124 | static void com20020_detach(struct pcmcia_device *p_dev); | 124 | static void com20020_detach(struct pcmcia_device *p_dev); |
@@ -138,7 +138,7 @@ typedef struct com20020_dev_t { | |||
138 | 138 | ||
139 | ======================================================================*/ | 139 | ======================================================================*/ |
140 | 140 | ||
141 | static int com20020_attach(struct pcmcia_device *p_dev) | 141 | static int com20020_probe(struct pcmcia_device *p_dev) |
142 | { | 142 | { |
143 | com20020_dev_t *info; | 143 | com20020_dev_t *info; |
144 | struct net_device *dev; | 144 | struct net_device *dev; |
@@ -179,9 +179,7 @@ static int com20020_attach(struct pcmcia_device *p_dev) | |||
179 | p_dev->priv = info; | 179 | p_dev->priv = info; |
180 | 180 | ||
181 | p_dev->state |= DEV_PRESENT; | 181 | p_dev->state |= DEV_PRESENT; |
182 | com20020_config(p_dev); | 182 | return com20020_config(p_dev); |
183 | |||
184 | return 0; | ||
185 | 183 | ||
186 | fail_alloc_dev: | 184 | fail_alloc_dev: |
187 | kfree(info); | 185 | kfree(info); |
@@ -250,7 +248,7 @@ static void com20020_detach(struct pcmcia_device *link) | |||
250 | #define CS_CHECK(fn, ret) \ | 248 | #define CS_CHECK(fn, ret) \ |
251 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | 249 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) |
252 | 250 | ||
253 | static void com20020_config(struct pcmcia_device *link) | 251 | static int com20020_config(struct pcmcia_device *link) |
254 | { | 252 | { |
255 | struct arcnet_local *lp; | 253 | struct arcnet_local *lp; |
256 | tuple_t tuple; | 254 | tuple_t tuple; |
@@ -345,13 +343,14 @@ static void com20020_config(struct pcmcia_device *link) | |||
345 | 343 | ||
346 | DEBUG(1,KERN_INFO "%s: port %#3lx, irq %d\n", | 344 | DEBUG(1,KERN_INFO "%s: port %#3lx, irq %d\n", |
347 | dev->name, dev->base_addr, dev->irq); | 345 | dev->name, dev->base_addr, dev->irq); |
348 | return; | 346 | return 0; |
349 | 347 | ||
350 | cs_failed: | 348 | cs_failed: |
351 | cs_error(link, last_fn, last_ret); | 349 | cs_error(link, last_fn, last_ret); |
352 | failed: | 350 | failed: |
353 | DEBUG(1,"com20020_config failed...\n"); | 351 | DEBUG(1,"com20020_config failed...\n"); |
354 | com20020_release(link); | 352 | com20020_release(link); |
353 | return -ENODEV; | ||
355 | } /* com20020_config */ | 354 | } /* com20020_config */ |
356 | 355 | ||
357 | /*====================================================================== | 356 | /*====================================================================== |
@@ -404,7 +403,7 @@ static struct pcmcia_driver com20020_cs_driver = { | |||
404 | .drv = { | 403 | .drv = { |
405 | .name = "com20020_cs", | 404 | .name = "com20020_cs", |
406 | }, | 405 | }, |
407 | .probe = com20020_attach, | 406 | .probe = com20020_probe, |
408 | .remove = com20020_detach, | 407 | .remove = com20020_detach, |
409 | .id_table = com20020_ids, | 408 | .id_table = com20020_ids, |
410 | .suspend = com20020_suspend, | 409 | .suspend = com20020_suspend, |