Skip to content

Commit f1fc399

Browse files
Petr VandrovecLinus Torvalds
authored andcommitted
[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 <vandrove@vc.cvut.cz> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent 4f167fb commit f1fc399

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/serial/serial_cs.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -661,10 +661,10 @@ void serial_config(dev_link_t * link)
661661
/* Is this a multiport card? */
662662
tuple->DesiredTuple = CISTPL_MANFID;
663663
if (first_tuple(handle, tuple, parse) == CS_SUCCESS) {
664-
info->manfid = le16_to_cpu(buf[0]);
664+
info->manfid = parse->manfid.manf;
665665
for (i = 0; i < MULTI_COUNT; i++)
666666
if ((info->manfid == multi_id[i].manfid) &&
667-
(le16_to_cpu(buf[1]) == multi_id[i].prodid))
667+
(parse->manfid.card == multi_id[i].prodid))
668668
break;
669669
if (i < MULTI_COUNT)
670670
info->multi = multi_id[i].multi;

0 commit comments

Comments
 (0)