Fix for bug #932 (should go into 0.2.9 also)
authorAleksey Bragin <aleksey@reactos.org>
Sat, 10 Dec 2005 19:22:43 +0000 (19:22 +0000)
committerAleksey Bragin <aleksey@reactos.org>
Sat, 10 Dec 2005 19:22:43 +0000 (19:22 +0000)
svn path=/trunk/; revision=20041

reactos/drivers/usb/miniport/usbohci/ohci-pci.c
reactos/drivers/usb/usbport/hcd.h

index 95ca524..2ba3d7d 100644 (file)
@@ -312,7 +312,7 @@ ohci_dbg (ohci, "sleeping = %d, disabled = %d\n",
 
 /*-------------------------------------------------------------------------*/
 
-static const struct hc_driver ohci_pci_hc_driver = {
+static struct hc_driver ohci_pci_hc_driver = {
        .description =          hcd_name,
 
        /*
index ac564c6..593ef5d 100644 (file)
@@ -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) {}