aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/pcmcia/com20020_cs.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/pcmcia/com20020_cs.c')
-rw-r--r--drivers/net/pcmcia/com20020_cs.c15
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
121static void com20020_config(struct pcmcia_device *link); 121static int com20020_config(struct pcmcia_device *link);
122static void com20020_release(struct pcmcia_device *link); 122static void com20020_release(struct pcmcia_device *link);
123 123
124static void com20020_detach(struct pcmcia_device *p_dev); 124static void com20020_detach(struct pcmcia_device *p_dev);
@@ -138,7 +138,7 @@ typedef struct com20020_dev_t {
138 138
139======================================================================*/ 139======================================================================*/
140 140
141static int com20020_attach(struct pcmcia_device *p_dev) 141static 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
186fail_alloc_dev: 184fail_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) \
251do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) 249do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0)
252 250
253static void com20020_config(struct pcmcia_device *link) 251static 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
350cs_failed: 348cs_failed:
351 cs_error(link, last_fn, last_ret); 349 cs_error(link, last_fn, last_ret);
352failed: 350failed:
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,