Fixed StillImageHost not correctly freezing and unfreezing data pipes while waiting...
[pub/USBasp.git] / LUFA / Drivers / USB / Class / Host / MassStorage.c
index 6a8373a..678c070 100644 (file)
@@ -95,9 +95,12 @@ static uint8_t DComp_NextMSInterface(void* CurrentDescriptor)
 {\r
        if (DESCRIPTOR_TYPE(CurrentDescriptor) == DTYPE_Interface)\r
        {\r
-               if ((DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Class    == MASS_STORE_CLASS)    &&\r
-                   (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).SubClass == MASS_STORE_SUBCLASS) &&\r
-                   (DESCRIPTOR_CAST(CurrentDescriptor, USB_Descriptor_Interface_t).Protocol == MASS_STORE_PROTOCOL))\r
+               USB_Descriptor_Interface_t* CurrentInterface = DESCRIPTOR_PCAST(CurrentDescriptor,\r
+                                                                               USB_Descriptor_Interface_t);\r
+\r
+               if ((CurrentInterface->Class    == MASS_STORE_CLASS)    &&\r
+                   (CurrentInterface->SubClass == MASS_STORE_SUBCLASS) &&\r
+                   (CurrentInterface->Protocol == MASS_STORE_PROTOCOL))\r
                {\r
                        return DESCRIPTOR_SEARCH_Found;\r
                }\r