Commit f1fc3990 authored by Petr Vandrovec's avatar Petr Vandrovec Committed by Linus Torvalds

[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: default avatarPetr Vandrovec <vandrove@vc.cvut.cz>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 4f167fb4
...@@ -661,10 +661,10 @@ void serial_config(dev_link_t * link) ...@@ -661,10 +661,10 @@ void serial_config(dev_link_t * link)
/* Is this a multiport card? */ /* Is this a multiport card? */
tuple->DesiredTuple = CISTPL_MANFID; tuple->DesiredTuple = CISTPL_MANFID;
if (first_tuple(handle, tuple, parse) == CS_SUCCESS) { 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++) for (i = 0; i < MULTI_COUNT; i++)
if ((info->manfid == multi_id[i].manfid) && if ((info->manfid == multi_id[i].manfid) &&
(le16_to_cpu(buf[1]) == multi_id[i].prodid)) (parse->manfid.card == multi_id[i].prodid))
break; break;
if (i < MULTI_COUNT) if (i < MULTI_COUNT)
info->multi = multi_id[i].multi; info->multi = multi_id[i].multi;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment