diff options
author | Russell King <rmk@dyn-67.arm.linux.org.uk> | 2006-09-16 21:26:16 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2006-10-01 17:06:27 +0100 |
commit | a8244b564ccc46dabf2367008aecf2b380a9be8d (patch) | |
tree | 91d31ff2438f11f8529cf12e9dd6034e7a315086 /drivers/serial/serial_cs.c | |
parent | 1fbbac4bcb03033d325c71fc7273aa0b9c1d9a03 (diff) | |
download | blackbird-op-linux-a8244b564ccc46dabf2367008aecf2b380a9be8d.tar.gz blackbird-op-linux-a8244b564ccc46dabf2367008aecf2b380a9be8d.zip |
[SERIAL] serial_cs: allow wildcarded quirks
Some quirks we will introduce next apply to (eg) all cards of one
manufacturer. Therefore, we need a way to list these in the quirk
table - use ~0 - this is not a possible device ID value.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/serial_cs.c')
-rw-r--r-- | drivers/serial/serial_cs.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 2e3a39d38f08..82d42f30725e 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c @@ -81,8 +81,8 @@ module_param(buggy_uart, int, 0444); /* Table of multi-port card ID's */ struct serial_quirk { - u_short manfid; - u_short prodid; + unsigned int manfid; + unsigned int prodid; int multi; /* 1 = multifunction, > 1 = # ports */ }; @@ -645,9 +645,12 @@ static int serial_config(struct pcmcia_device * link) if (first_tuple(link, tuple, parse) == CS_SUCCESS) { info->manfid = parse->manfid.manf; info->prodid = parse->manfid.card; + for (i = 0; i < ARRAY_SIZE(quirks); i++) - if ((info->manfid == quirks[i].manfid) && - (info->prodid == quirks[i].prodid)) { + if ((quirks[i].manfid == ~0 || + quirks[i].manfid == info->manfid) && + (quirks[i].prodid == ~0 || + quirks[i].prodid == info->prodid)) { info->quirk = &quirks[i]; break; } |