diff options
Diffstat (limited to 'drivers/char/pcmcia/synclink_cs.c')
-rw-r--r-- | drivers/char/pcmcia/synclink_cs.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 429b7313119b..09b2590adb8b 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c | |||
@@ -572,9 +572,6 @@ static int mgslpc_probe(struct pcmcia_device *link) | |||
572 | /* Card has been inserted. | 572 | /* Card has been inserted. |
573 | */ | 573 | */ |
574 | 574 | ||
575 | #define CS_CHECK(fn, ret) \ | ||
576 | do { last_fn = (fn); if ((last_ret = (ret)) != 0) goto cs_failed; } while (0) | ||
577 | |||
578 | static int mgslpc_ioprobe(struct pcmcia_device *p_dev, | 575 | static int mgslpc_ioprobe(struct pcmcia_device *p_dev, |
579 | cistpl_cftable_entry_t *cfg, | 576 | cistpl_cftable_entry_t *cfg, |
580 | cistpl_cftable_entry_t *dflt, | 577 | cistpl_cftable_entry_t *dflt, |
@@ -598,15 +595,14 @@ static int mgslpc_ioprobe(struct pcmcia_device *p_dev, | |||
598 | static int mgslpc_config(struct pcmcia_device *link) | 595 | static int mgslpc_config(struct pcmcia_device *link) |
599 | { | 596 | { |
600 | MGSLPC_INFO *info = link->priv; | 597 | MGSLPC_INFO *info = link->priv; |
601 | int last_fn = RequestIO; | 598 | int ret; |
602 | int last_ret; | ||
603 | 599 | ||
604 | if (debug_level >= DEBUG_LEVEL_INFO) | 600 | if (debug_level >= DEBUG_LEVEL_INFO) |
605 | printk("mgslpc_config(0x%p)\n", link); | 601 | printk("mgslpc_config(0x%p)\n", link); |
606 | 602 | ||
607 | last_ret = pcmcia_loop_config(link, mgslpc_ioprobe, NULL); | 603 | ret = pcmcia_loop_config(link, mgslpc_ioprobe, NULL); |
608 | if (last_ret != 0) | 604 | if (ret != 0) |
609 | goto cs_failed; | 605 | goto failed; |
610 | 606 | ||
611 | link->conf.Attributes = CONF_ENABLE_IRQ; | 607 | link->conf.Attributes = CONF_ENABLE_IRQ; |
612 | link->conf.IntType = INT_MEMORY_AND_IO; | 608 | link->conf.IntType = INT_MEMORY_AND_IO; |
@@ -616,9 +612,13 @@ static int mgslpc_config(struct pcmcia_device *link) | |||
616 | link->irq.Attributes |= IRQ_HANDLE_PRESENT; | 612 | link->irq.Attributes |= IRQ_HANDLE_PRESENT; |
617 | link->irq.Handler = mgslpc_isr; | 613 | link->irq.Handler = mgslpc_isr; |
618 | link->irq.Instance = info; | 614 | link->irq.Instance = info; |
619 | CS_CHECK(RequestIRQ, pcmcia_request_irq(link, &link->irq)); | ||
620 | 615 | ||
621 | CS_CHECK(RequestConfiguration, pcmcia_request_configuration(link, &link->conf)); | 616 | ret = pcmcia_request_irq(link, &link->irq); |
617 | if (ret) | ||
618 | goto failed; | ||
619 | ret = pcmcia_request_configuration(link, &link->conf); | ||
620 | if (ret) | ||
621 | goto failed; | ||
622 | 622 | ||
623 | info->io_base = link->io.BasePort1; | 623 | info->io_base = link->io.BasePort1; |
624 | info->irq_level = link->irq.AssignedIRQ; | 624 | info->irq_level = link->irq.AssignedIRQ; |
@@ -638,8 +638,7 @@ static int mgslpc_config(struct pcmcia_device *link) | |||
638 | printk("\n"); | 638 | printk("\n"); |
639 | return 0; | 639 | return 0; |
640 | 640 | ||
641 | cs_failed: | 641 | failed: |
642 | cs_error(link, last_fn, last_ret); | ||
643 | mgslpc_release((u_long)link); | 642 | mgslpc_release((u_long)link); |
644 | return -ENODEV; | 643 | return -ENODEV; |
645 | } | 644 | } |