mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 08:00:24 +00:00
- Store DeviceObject before calling IMiniportTopology's init function
svn path=/trunk/; revision=38859
This commit is contained in:
parent
1832435672
commit
fa5bc6ed26
1 changed files with 7 additions and 11 deletions
|
@ -10,7 +10,6 @@ typedef struct
|
|||
|
||||
PMINIPORTTOPOLOGY pMiniport;
|
||||
PDEVICE_OBJECT pDeviceObject;
|
||||
PRESOURCELIST pResourceList;
|
||||
PPINCOUNT pPinCount;
|
||||
PPOWERNOTIFY pPowerNotify;
|
||||
|
||||
|
@ -148,7 +147,8 @@ IPortTopology_fnInit(
|
|||
NTSTATUS Status;
|
||||
IPortTopologyImpl * This = (IPortTopologyImpl*)iface;
|
||||
|
||||
DPRINT1("IPortTopology_fnInit entered\n");
|
||||
DPRINT1("IPortTopology_fnInit entered This %p DeviceObject %p Irp %p UnknownMiniport %p UnknownAdapter %p ResourceList %p\n",
|
||||
This, DeviceObject, Irp, UnknownMiniport, UnknownAdapter, ResourceList);
|
||||
|
||||
if (This->bInitialized)
|
||||
{
|
||||
|
@ -163,23 +163,19 @@ IPortTopology_fnInit(
|
|||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
/* increment reference on resource list */
|
||||
//HACK
|
||||
//ResourceList->lpVtbl->AddRef(ResourceList);
|
||||
/* Initialize port object */
|
||||
This->pMiniport = Miniport;
|
||||
This->pDeviceObject = DeviceObject;
|
||||
This->bInitialized = TRUE;
|
||||
|
||||
Status = Miniport->lpVtbl->Init(Miniport, UnknownAdapter, ResourceList, iface);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DPRINT1("IPortTopology_Init failed with %x\n", Status);
|
||||
This->bInitialized = FALSE;
|
||||
return Status;
|
||||
}
|
||||
|
||||
/* Initialize port object */
|
||||
This->pMiniport = Miniport;
|
||||
This->pDeviceObject = DeviceObject;
|
||||
This->bInitialized = TRUE;
|
||||
This->pResourceList = ResourceList;
|
||||
|
||||
/* increment reference on miniport adapter */
|
||||
Miniport->lpVtbl->AddRef(Miniport);
|
||||
|
||||
|
|
Loading…
Reference in a new issue