From: Hervé Poussineau Date: Mon, 12 Dec 2005 22:52:16 +0000 (+0000) Subject: Minimize differences between UHCI and OHCI X-Git-Tag: backups/expat-rbuild@40467~965 X-Git-Url: https://git.reactos.org/?p=reactos.git;a=commitdiff_plain;h=ad18ef445eff30bb30bd58522e891840be120c86 Minimize differences between UHCI and OHCI No need to return an empty string in IRP_MN_QUERY_ID / BusQueryInstanceID ; a null string is enough svn path=/trunk/; revision=20130 --- diff --git a/reactos/drivers/usb/miniport/common/pdo.c b/reactos/drivers/usb/miniport/common/pdo.c index 4e39430d7d4..abdda03c950 100644 --- a/reactos/drivers/usb/miniport/common/pdo.c +++ b/reactos/drivers/usb/miniport/common/pdo.c @@ -170,8 +170,8 @@ UsbMpPdoQueryId( case BusQueryInstanceID: { DPRINT("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / BusQueryInstanceID\n"); - RtlInitUnicodeString(&SourceString, L""); - break; + *Information = 0; + return Status; } default: DPRINT1("USBMP: IRP_MJ_PNP / IRP_MN_QUERY_ID / unknown query id type 0x%lx\n", IdType); diff --git a/reactos/drivers/usb/miniport/usbohci/ohci.c b/reactos/drivers/usb/miniport/usbohci/ohci.c index 2da6b0de970..a97c465f249 100644 --- a/reactos/drivers/usb/miniport/usbohci/ohci.c +++ b/reactos/drivers/usb/miniport/usbohci/ohci.c @@ -21,16 +21,16 @@ InitLinuxWrapper(PDEVICE_OBJECT DeviceObject) /* Initialize generic linux structure */ dev->irq = DeviceExtension->InterruptVector; dev->dev_ext = (PVOID)DeviceExtension; - dev->dev.dev_ext = (PVOID)DeviceObject; + dev->dev.dev_ext = DeviceObject; dev->slot_name = ExAllocatePoolWithTag(NonPagedPool, 128, USB_OHCI_TAG); // 128 max len for slot name - // Init wrapper + /* Init wrapper */ init_wrapper(dev); strcpy(dev->dev.name, "OpenHCI PCI-USB Controller"); strcpy(dev->slot_name, "OHCD PCI Slot"); - // Init the OHCI HCD. Probe will be called automatically, but will fail because id=NULL + /* Init the OHCI HCD. Probe will be called automatically, but will fail because id=NULL */ Status = ohci_hcd_pci_init(); if (!NT_SUCCESS(Status)) { @@ -40,10 +40,10 @@ InitLinuxWrapper(PDEVICE_OBJECT DeviceObject) return Status; } - // Init core usb + /* Init core usb */ usb_init(); - // Probe device with real id now + /* Probe device with real id now */ ohci_pci_driver.probe(dev, ohci_pci_ids); return STATUS_SUCCESS; diff --git a/reactos/drivers/usb/miniport/usbuhci/uhci.c b/reactos/drivers/usb/miniport/usbuhci/uhci.c index bf07f780154..27171032f66 100644 --- a/reactos/drivers/usb/miniport/usbuhci/uhci.c +++ b/reactos/drivers/usb/miniport/usbuhci/uhci.c @@ -14,8 +14,7 @@ struct pci_device_id* pci_ids = &uhci_pci_ids[0]; NTSTATUS InitLinuxWrapper(PDEVICE_OBJECT DeviceObject) { - NTSTATUS Status = STATUS_SUCCESS; - + NTSTATUS Status; PUSBMP_DEVICE_EXTENSION DeviceExtension = (PUSBMP_DEVICE_EXTENSION)DeviceObject->DeviceExtension; /* Create generic linux structure */ @@ -26,8 +25,10 @@ InitLinuxWrapper(PDEVICE_OBJECT DeviceObject) /* Initialize generic linux structure */ dev->irq = DeviceExtension->InterruptVector; dev->dev_ext = (PVOID)DeviceExtension; - dev->dev.dev_ext = (PVOID)DeviceObject; + dev->dev.dev_ext = DeviceObject; dev->slot_name = ExAllocatePoolWithTag(NonPagedPool, 128, USB_UHCI_TAG); // 128 max len for slot name + + /* Init wrapper */ init_wrapper(dev); strcpy(dev->dev.name, "UnivHCI PCI-USB Controller"); @@ -49,7 +50,7 @@ InitLinuxWrapper(PDEVICE_OBJECT DeviceObject) /* Probe device with real id now */ uhci_pci_driver.probe(dev, uhci_pci_ids); - return Status; + return STATUS_SUCCESS; } VOID STDCALL