mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +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;
|
PMINIPORTTOPOLOGY pMiniport;
|
||||||
PDEVICE_OBJECT pDeviceObject;
|
PDEVICE_OBJECT pDeviceObject;
|
||||||
PRESOURCELIST pResourceList;
|
|
||||||
PPINCOUNT pPinCount;
|
PPINCOUNT pPinCount;
|
||||||
PPOWERNOTIFY pPowerNotify;
|
PPOWERNOTIFY pPowerNotify;
|
||||||
|
|
||||||
|
@ -148,7 +147,8 @@ IPortTopology_fnInit(
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
IPortTopologyImpl * This = (IPortTopologyImpl*)iface;
|
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)
|
if (This->bInitialized)
|
||||||
{
|
{
|
||||||
|
@ -163,23 +163,19 @@ IPortTopology_fnInit(
|
||||||
return STATUS_INVALID_PARAMETER;
|
return STATUS_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* increment reference on resource list */
|
/* Initialize port object */
|
||||||
//HACK
|
This->pMiniport = Miniport;
|
||||||
//ResourceList->lpVtbl->AddRef(ResourceList);
|
This->pDeviceObject = DeviceObject;
|
||||||
|
This->bInitialized = TRUE;
|
||||||
|
|
||||||
Status = Miniport->lpVtbl->Init(Miniport, UnknownAdapter, ResourceList, iface);
|
Status = Miniport->lpVtbl->Init(Miniport, UnknownAdapter, ResourceList, iface);
|
||||||
if (!NT_SUCCESS(Status))
|
if (!NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
DPRINT1("IPortTopology_Init failed with %x\n", Status);
|
DPRINT1("IPortTopology_Init failed with %x\n", Status);
|
||||||
|
This->bInitialized = FALSE;
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize port object */
|
|
||||||
This->pMiniport = Miniport;
|
|
||||||
This->pDeviceObject = DeviceObject;
|
|
||||||
This->bInitialized = TRUE;
|
|
||||||
This->pResourceList = ResourceList;
|
|
||||||
|
|
||||||
/* increment reference on miniport adapter */
|
/* increment reference on miniport adapter */
|
||||||
Miniport->lpVtbl->AddRef(Miniport);
|
Miniport->lpVtbl->AddRef(Miniport);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue