Author: janderwald
Date: Sat Jan 17 17:11:11 2009
New Revision: 38859
URL:
http://svn.reactos.org/svn/reactos?rev=38859&view=rev
Log:
- Store DeviceObject before calling IMiniportTopology's init function
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_topology.c [iso-8859-1] Sat Jan
17 17:11:11 2009
@@ -10,7 +10,6 @@
PMINIPORTTOPOLOGY pMiniport;
PDEVICE_OBJECT pDeviceObject;
- PRESOURCELIST pResourceList;
PPINCOUNT pPinCount;
PPOWERNOTIFY pPowerNotify;
@@ -148,7 +147,8 @@
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)
{
@@ -161,24 +161,20 @@
{
DPRINT1("IPortTopology_Init called with invalid IMiniport adapter\n");
return STATUS_INVALID_PARAMETER;
- }
-
- /* increment reference on resource list */
- //HACK
- //ResourceList->lpVtbl->AddRef(ResourceList);
-
- Status = Miniport->lpVtbl->Init(Miniport, UnknownAdapter, ResourceList,
iface);
- if (!NT_SUCCESS(Status))
- {
- DPRINT1("IPortTopology_Init failed with %x\n", Status);
- return Status;
}
/* Initialize port object */
This->pMiniport = Miniport;
This->pDeviceObject = DeviceObject;
This->bInitialized = TRUE;
- This->pResourceList = ResourceList;
+
+ 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;
+ }
/* increment reference on miniport adapter */
Miniport->lpVtbl->AddRef(Miniport);