diff options
Diffstat (limited to 'drivers/serial/serial_cs.c')
-rw-r--r-- | drivers/serial/serial_cs.c | 27 |
1 files changed, 9 insertions, 18 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 8cfa5b12ea7a..6459252ed371 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
@@ -343,7 +343,6 @@ static int serial_probe(struct pcmcia_device *link) | |||
343 | 343 | ||
344 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; | 344 | link->io.Attributes1 = IO_DATA_PATH_WIDTH_8; |
345 | link->io.NumPorts1 = 8; | 345 | link->io.NumPorts1 = 8; |
346 | link->irq.Attributes = IRQ_TYPE_DYNAMIC_SHARING; | ||
347 | link->conf.Attributes = CONF_ENABLE_IRQ; | 346 | link->conf.Attributes = CONF_ENABLE_IRQ; |
348 | if (do_sound) { | 347 | if (do_sound) { |
349 | link->conf.Attributes |= CONF_ENABLE_SPKR; | 348 | link->conf.Attributes |= CONF_ENABLE_SPKR; |
@@ -486,7 +485,7 @@ static int simple_config(struct pcmcia_device *link) | |||
486 | } | 485 | } |
487 | if (info->slave) { | 486 | if (info->slave) { |
488 | return setup_serial(link, info, port, | 487 | return setup_serial(link, info, port, |
489 | link->irq.AssignedIRQ); | 488 | link->irq); |
490 | } | 489 | } |
491 | } | 490 | } |
492 | 491 | ||
@@ -507,10 +506,6 @@ static int simple_config(struct pcmcia_device *link) | |||
507 | return -1; | 506 | return -1; |
508 | 507 | ||
509 | found_port: | 508 | found_port: |
510 | i = pcmcia_request_irq(link, &link->irq); | ||
511 | if (i != 0) | ||
512 | link->irq.AssignedIRQ = 0; | ||
513 | |||
514 | if (info->multi && (info->manfid == MANFID_3COM)) | 509 | if (info->multi && (info->manfid == MANFID_3COM)) |
515 | link->conf.ConfigIndex &= ~(0x08); | 510 | link->conf.ConfigIndex &= ~(0x08); |
516 | 511 | ||
@@ -523,7 +518,7 @@ found_port: | |||
523 | i = pcmcia_request_configuration(link, &link->conf); | 518 | i = pcmcia_request_configuration(link, &link->conf); |
524 | if (i != 0) | 519 | if (i != 0) |
525 | return -1; | 520 | return -1; |
526 | return setup_serial(link, info, link->io.BasePort1, link->irq.AssignedIRQ); | 521 | return setup_serial(link, info, link->io.BasePort1, link->irq); |
527 | } | 522 | } |
528 | 523 | ||
529 | static int multi_config_check(struct pcmcia_device *p_dev, | 524 | static int multi_config_check(struct pcmcia_device *p_dev, |
@@ -586,13 +581,9 @@ static int multi_config(struct pcmcia_device *link) | |||
586 | } | 581 | } |
587 | } | 582 | } |
588 | 583 | ||
589 | i = pcmcia_request_irq(link, &link->irq); | 584 | if (!link->irq) |
590 | if (i != 0) { | 585 | dev_warn(&link->dev, |
591 | /* FIXME: comment does not fit, error handling does not fit */ | 586 | "serial_cs: no usable IRQ found, continuing...\n"); |
592 | printk(KERN_NOTICE | ||
593 | "serial_cs: no usable port range found, giving up\n"); | ||
594 | link->irq.AssignedIRQ = 0; | ||
595 | } | ||
596 | 587 | ||
597 | /* | 588 | /* |
598 | * Apply any configuration quirks. | 589 | * Apply any configuration quirks. |
@@ -615,11 +606,11 @@ static int multi_config(struct pcmcia_device *link) | |||
615 | if (link->conf.ConfigIndex == 1 || | 606 | if (link->conf.ConfigIndex == 1 || |
616 | link->conf.ConfigIndex == 3) { | 607 | link->conf.ConfigIndex == 3) { |
617 | err = setup_serial(link, info, base2, | 608 | err = setup_serial(link, info, base2, |
618 | link->irq.AssignedIRQ); | 609 | link->irq); |
619 | base2 = link->io.BasePort1; | 610 | base2 = link->io.BasePort1; |
620 | } else { | 611 | } else { |
621 | err = setup_serial(link, info, link->io.BasePort1, | 612 | err = setup_serial(link, info, link->io.BasePort1, |
622 | link->irq.AssignedIRQ); | 613 | link->irq); |
623 | } | 614 | } |
624 | info->c950ctrl = base2; | 615 | info->c950ctrl = base2; |
625 | 616 | ||
@@ -633,10 +624,10 @@ static int multi_config(struct pcmcia_device *link) | |||
633 | return 0; | 624 | return 0; |
634 | } | 625 | } |
635 | 626 | ||
636 | setup_serial(link, info, link->io.BasePort1, link->irq.AssignedIRQ); | 627 | setup_serial(link, info, link->io.BasePort1, link->irq); |
637 | for (i = 0; i < info->multi - 1; i++) | 628 | for (i = 0; i < info->multi - 1; i++) |
638 | setup_serial(link, info, base2 + (8 * i), | 629 | setup_serial(link, info, base2 + (8 * i), |
639 | link->irq.AssignedIRQ); | 630 | link->irq); |
640 | return 0; | 631 | return 0; |
641 | } | 632 | } |
642 | 633 | ||