diff options
-rw-r--r-- | drivers/serial/serial_cs.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index cbf260bc225d..82bb603fc1ae 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c | |||
@@ -95,7 +95,6 @@ static const struct multi_id multi_id[] = { | |||
95 | { MANFID_INTEL, PRODID_INTEL_DUAL_RS232, 2 }, | 95 | { MANFID_INTEL, PRODID_INTEL_DUAL_RS232, 2 }, |
96 | { MANFID_NATINST, PRODID_NATINST_QUAD_RS232, 4 } | 96 | { MANFID_NATINST, PRODID_NATINST_QUAD_RS232, 4 } |
97 | }; | 97 | }; |
98 | #define MULTI_COUNT (sizeof(multi_id)/sizeof(struct multi_id)) | ||
99 | 98 | ||
100 | struct serial_info { | 99 | struct serial_info { |
101 | struct pcmcia_device *p_dev; | 100 | struct pcmcia_device *p_dev; |
@@ -622,13 +621,13 @@ static int serial_config(struct pcmcia_device * link) | |||
622 | tuple->DesiredTuple = CISTPL_MANFID; | 621 | tuple->DesiredTuple = CISTPL_MANFID; |
623 | if (first_tuple(link, tuple, parse) == CS_SUCCESS) { | 622 | if (first_tuple(link, tuple, parse) == CS_SUCCESS) { |
624 | info->manfid = parse->manfid.manf; | 623 | info->manfid = parse->manfid.manf; |
625 | info->prodid = le16_to_cpu(buf[1]); | 624 | info->prodid = parse->manfid.card; |
626 | for (i = 0; i < MULTI_COUNT; i++) | 625 | for (i = 0; i < ARRAY_SIZE(multi_id); i++) |
627 | if ((info->manfid == multi_id[i].manfid) && | 626 | if ((info->manfid == multi_id[i].manfid) && |
628 | (parse->manfid.card == multi_id[i].prodid)) | 627 | (info->prodid == multi_id[i].prodid)) { |
628 | info->multi = multi_id[i].multi; | ||
629 | break; | 629 | break; |
630 | if (i < MULTI_COUNT) | 630 | } |
631 | info->multi = multi_id[i].multi; | ||
632 | } | 631 | } |
633 | 632 | ||
634 | /* Another check for dual-serial cards: look for either serial or | 633 | /* Another check for dual-serial cards: look for either serial or |