From f1fc3990e2ffa14310cae89678c0b4ed1a3f094b Mon Sep 17 00:00:00 2001 From: Petr Vandrovec Date: Mon, 16 May 2005 21:53:44 -0700 Subject: [PATCH] [PATCH] serial_cs device identification fix serial_cs's vendor/device identification got broken by Yum Rayan's change '[PATCH] serial_cs: Reduce stack usage in serial_event()' - it changed buf type from u_short* to char*, breaking device manufacturer & card number retrieval. Due to this my modem stopped from being recognized as special case. Code will work much better if we'll rely on first_tuple's parser instead of doing parse ourselves. Code also looks simpler after change. Signed-off-by: Petr Vandrovec Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/serial/serial_cs.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c index 6eeb48f6a482..0d7b65f93e8d 100644 --- a/drivers/serial/serial_cs.c +++ b/drivers/serial/serial_cs.c @@ -661,10 +661,10 @@ void serial_config(dev_link_t * link) /* Is this a multiport card? */ tuple->DesiredTuple = CISTPL_MANFID; if (first_tuple(handle, tuple, parse) == CS_SUCCESS) { - info->manfid = le16_to_cpu(buf[0]); + info->manfid = parse->manfid.manf; for (i = 0; i < MULTI_COUNT; i++) if ((info->manfid == multi_id[i].manfid) && - (le16_to_cpu(buf[1]) == multi_id[i].prodid)) + (parse->manfid.card == multi_id[i].prodid)) break; if (i < MULTI_COUNT) info->multi = multi_id[i].multi; -- 2.20.1