diff options
Diffstat (limited to 'drivers/serial/serial_cs.c')
-rw-r--r-- | drivers/serial/serial_cs.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 7e00e672bfe7..344e570fbb6f 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
@@ -488,23 +488,23 @@ static int simple_config_check_notpicky(struct pcmcia_device *p_dev, | |||
488 | static int simple_config(struct pcmcia_device *link) | 488 | static int simple_config(struct pcmcia_device *link) |
489 | { | 489 | { |
490 | struct serial_info *info = link->priv; | 490 | struct serial_info *info = link->priv; |
491 | config_info_t config; | 491 | int i = -ENODEV, try; |
492 | int i, try; | ||
493 | 492 | ||
494 | /* If the card is already configured, look up the port and irq */ | 493 | /* If the card is already configured, look up the port and irq */ |
495 | i = pcmcia_get_configuration_info(link, &config); | 494 | if (link->function_config) { |
496 | if ((i == CS_SUCCESS) && (config.Attributes & CONF_VALID_CLIENT)) { | ||
497 | unsigned int port = 0; | 495 | unsigned int port = 0; |
498 | if ((config.BasePort2 != 0) && (config.NumPorts2 == 8)) { | 496 | if ((link->io.BasePort2 != 0) && |
499 | port = config.BasePort2; | 497 | (link->io.NumPorts2 == 8)) { |
498 | port = link->io.BasePort2; | ||
500 | info->slave = 1; | 499 | info->slave = 1; |
501 | } else if ((info->manfid == MANFID_OSITECH) && | 500 | } else if ((info->manfid == MANFID_OSITECH) && |
502 | (config.NumPorts1 == 0x40)) { | 501 | (link->io.NumPorts1 == 0x40)) { |
503 | port = config.BasePort1 + 0x28; | 502 | port = link->io.BasePort1 + 0x28; |
504 | info->slave = 1; | 503 | info->slave = 1; |
505 | } | 504 | } |
506 | if (info->slave) { | 505 | if (info->slave) { |
507 | return setup_serial(link, info, port, config.AssignedIRQ); | 506 | return setup_serial(link, info, port, |
507 | link->irq.AssignedIRQ); | ||
508 | } | 508 | } |
509 | } | 509 | } |
510 | 510 | ||