aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2006-09-16 16:26:16 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2006-10-01 12:06:27 -0400
commita8244b564ccc46dabf2367008aecf2b380a9be8d (patch)
tree91d31ff2438f11f8529cf12e9dd6034e7a315086 /drivers
parent1fbbac4bcb03033d325c71fc7273aa0b9c1d9a03 (diff)
[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')
-rw-r--r--drivers/serial/serial_cs.c11
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);
81/* Table of multi-port card ID's */ 81/* Table of multi-port card ID's */
82 82
83struct serial_quirk { 83struct serial_quirk {
84 u_short manfid; 84 unsigned int manfid;
85 u_short prodid; 85 unsigned int prodid;
86 int multi; /* 1 = multifunction, > 1 = # ports */ 86 int multi; /* 1 = multifunction, > 1 = # ports */
87}; 87};
88 88
@@ -645,9 +645,12 @@ static int serial_config(struct pcmcia_device * link)
645 if (first_tuple(link, tuple, parse) == CS_SUCCESS) { 645 if (first_tuple(link, tuple, parse) == CS_SUCCESS) {
646 info->manfid = parse->manfid.manf; 646 info->manfid = parse->manfid.manf;
647 info->prodid = parse->manfid.card; 647 info->prodid = parse->manfid.card;
648
648 for (i = 0; i < ARRAY_SIZE(quirks); i++) 649 for (i = 0; i < ARRAY_SIZE(quirks); i++)
649 if ((info->manfid == quirks[i].manfid) && 650 if ((quirks[i].manfid == ~0 ||
650 (info->prodid == quirks[i].prodid)) { 651 quirks[i].manfid == info->manfid) &&
652 (quirks[i].prodid == ~0 ||
653 quirks[i].prodid == info->prodid)) {
651 info->quirk = &quirks[i]; 654 info->quirk = &quirks[i];
652 break; 655 break;
653 } 656 }