scd: Bug fix for a device with multiple interfaces.
authorNIIBE Yutaka <gniibe@fsij.org>
Mon, 7 Mar 2016 11:12:38 +0000 (20:12 +0900)
committerNIIBE Yutaka <gniibe@fsij.org>
Mon, 7 Mar 2016 11:12:38 +0000 (20:12 +0900)
* scd/ccid-driver.c (scan_or_find_usb_device): Use IFC_NO when
accessing interface information.

--
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
scd/ccid-driver.c

index 87cec32..e968b83 100644 (file)
@@ -1155,9 +1155,10 @@ scan_or_find_usb_device (int scan_mode,
 
       for (ifc_no=0; ifc_no < config->bNumInterfaces; ifc_no++)
         {
-          for (set_no=0; set_no < config->interface->num_altsetting; set_no++)
+          for (set_no=0; set_no < config->interface[ifc_no].num_altsetting;
+               set_no++)
             {
-              ifcdesc = (config->interface->altsetting + set_no);
+              ifcdesc = (config->interface[ifc_no].altsetting + set_no);
               /* The second condition is for older SCM SPR 532 who did
                  not know about the assigned CCID class.  The third
                  condition does the same for a Cherry SmartTerminal