Minimize differences between UHCI and OHCI
No need to return an empty string in IRP_MN_QUERY_ID /
BusQueryInstanceID ; a null string is enough
Modified: trunk/reactos/drivers/usb/miniport/common/pdo.c
Modified: trunk/reactos/drivers/usb/miniport/usbohci/ohci.c
Modified: trunk/reactos/drivers/usb/miniport/usbuhci/uhci.c
_____
Modified: trunk/reactos/drivers/usb/miniport/common/pdo.c
--- trunk/reactos/drivers/usb/miniport/common/pdo.c 2005-12-12
22:44:46 UTC (rev 20129)
+++ trunk/reactos/drivers/usb/miniport/common/pdo.c 2005-12-12
22:52:16 UTC (rev 20130)
@@ -170,8 +170,8 @@
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);
_____
Modified: trunk/reactos/drivers/usb/miniport/usbohci/ohci.c
--- trunk/reactos/drivers/usb/miniport/usbohci/ohci.c 2005-12-12
22:44:46 UTC (rev 20129)
+++ trunk/reactos/drivers/usb/miniport/usbohci/ohci.c 2005-12-12
22:52:16 UTC (rev 20130)
@@ -21,16 +21,16 @@
/* 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 @@
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;
_____
Modified: trunk/reactos/drivers/usb/miniport/usbuhci/uhci.c
--- trunk/reactos/drivers/usb/miniport/usbuhci/uhci.c 2005-12-12
22:44:46 UTC (rev 20129)
+++ trunk/reactos/drivers/usb/miniport/usbuhci/uhci.c 2005-12-12
22:52:16 UTC (rev 20130)
@@ -14,8 +14,7 @@
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 @@
/* 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 @@
/* Probe device with real id now */
uhci_pci_driver.probe(dev, uhci_pci_ids);
- return Status;
+ return STATUS_SUCCESS;
}
VOID STDCALL