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
This commit is contained in:
Hervé Poussineau 2005-12-12 22:52:16 +00:00
parent 4ae7fa84ae
commit ad18ef445e
3 changed files with 12 additions and 11 deletions

View file

@ -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);

View file

@ -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;

View file

@ -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