Fix for bug #932 (should go into 0.2.9 also)
[reactos.git] / reactos / drivers / usb / usbport / hcd.h
index e2454de..593ef5d 100644 (file)
@@ -206,7 +206,7 @@ struct hc_driver {
        int             (*hub_status_data) (struct usb_hcd *hcd, char *buf);
        int             (*hub_control) (struct usb_hcd *hcd,
                                u16 typeReq, u16 wValue, u16 wIndex,
-                               char *buf, u16 wLength);
+                               u8 *buf, u16 wLength);
 };
 
 // old version, "just in case"
@@ -458,7 +458,10 @@ static inline void usbfs_add_device(struct usb_device *dev)
        if (dev->parent)
        {
                PDEVICE_OBJECT Pdo = (PDEVICE_OBJECT)dev->parent->dev.dev_ext;
-               IoInvalidateDeviceRelations(Pdo, BusRelations);
+               if (Pdo)
+                       IoInvalidateDeviceRelations(Pdo, BusRelations);
+               else
+                       DPRINT1("Pdo == NULL, not sending IoInvalidateDeviceRelations()!");
        }
 }
 static inline void usbfs_remove_device(struct usb_device *dev) {}