Author: janderwald
Date: Fri Oct 29 13:47:19 2010
New Revision: 49340
URL:
http://svn.reactos.org/svn/reactos?rev=49340&view=rev
Log:
- Remove obsolete code
- Thanks to Amine
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp
trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavecyclic.cpp [iso-8859-1] Fri
Oct 29 13:47:19 2010
@@ -39,10 +39,8 @@
virtual ~CPortWaveCyclic(){}
protected:
- BOOL m_bInitialized;
PDEVICE_OBJECT m_pDeviceObject;
PMINIPORTWAVECYCLIC m_pMiniport;
- PRESOURCELIST m_pResourceList;
PPINCOUNT m_pPinCount;
PPOWERNOTIFY m_pPowerNotify;
PPCFILTER_DESCRIPTOR m_pDescriptor;
@@ -202,12 +200,6 @@
{
PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
- if (!m_bInitialized)
- {
- DPRINT("IPortWaveCyclic_fnNewRegistryKey called w/o initiazed\n");
- return STATUS_UNSUCCESSFUL;
- }
-
return IoGetDeviceProperty(m_pDeviceObject, DeviceRegistryProperty, BufferLength,
PropertyBuffer, ReturnLength);
}
@@ -228,12 +220,6 @@
DPRINT("IPortWaveCyclic_Init entered %p\n", this);
PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
- if (m_bInitialized)
- {
- DPRINT("IPortWaveCyclic_Init called again\n");
- return STATUS_SUCCESS;
- }
-
Status = UnknownMiniport->QueryInterface(IID_IMiniportWaveCyclic,
(PVOID*)&Miniport);
if (!NT_SUCCESS(Status))
{
@@ -244,22 +230,13 @@
// Initialize port object
m_pMiniport = Miniport;
m_pDeviceObject = DeviceObject;
- m_bInitialized = TRUE;
- m_pResourceList = ResourceList;
-
-
- if (ResourceList)
- {
- // increment reference on resource list
- ResourceList->AddRef();
- }
-
+
+ // initialize miniport
Status = Miniport->Init(UnknownAdapter, ResourceList, this);
if (!NT_SUCCESS(Status))
{
DPRINT("IMiniportWaveCyclic_Init failed with %x\n", Status);
Miniport->Release();
- m_bInitialized = FALSE;
return Status;
}
@@ -270,7 +247,6 @@
{
DPRINT("failed to get description\n");
Miniport->Release();
- m_bInitialized = FALSE;
return Status;
}
@@ -294,7 +270,6 @@
{
DPRINT("PcCreateSubdeviceDescriptor failed with %x\n", Status);
Miniport->Release();
- m_bInitialized = FALSE;
return Status;
}
@@ -335,11 +310,6 @@
{
PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
- if (!m_bInitialized)
- {
- DPRINT("IPortWaveCyclic_fnNewRegistryKey called w/o initialized\n");
- return STATUS_UNSUCCESSFUL;
- }
return PcNewRegistryKey(OutRegistryKey, OuterUnknown, RegistryKeyType, DesiredAccess,
m_pDeviceObject, (ISubdevice*)this, ObjectAttributes, CreateOptions, Disposition);
}
@@ -365,12 +335,6 @@
PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
- if (!m_bInitialized)
- {
- DPRINT("IPortWaveCyclic_fnNewSlaveDmaChannel called w/o
initialized\n");
- return STATUS_UNSUCCESSFUL;
- }
-
Status = PcDmaMasterDescription(ResourceList, (Dma32BitAddresses |
Dma64BitAddresses), Dma32BitAddresses, 0, Dma64BitAddresses, DmaWidth, DmaSpeed,
MaximumLength, 0, &DeviceDescription);
if (NT_SUCCESS(Status))
{
@@ -397,12 +361,6 @@
PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
- if (!m_bInitialized)
- {
- DPRINT("IPortWaveCyclic_fnNewSlaveDmaChannel called w/o
initialized\n");
- return STATUS_UNSUCCESSFUL;
- }
-
// FIXME
// Check for F-Type DMA Support
//
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp [iso-8859-1]
(original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/port_wavepci.cpp [iso-8859-1] Fri Oct
29 13:47:19 2010
@@ -43,8 +43,6 @@
PMINIPORTWAVEPCI m_Miniport;
PDEVICE_OBJECT m_pDeviceObject;
- BOOL m_bInitialized;
- PRESOURCELIST m_pResourceList;
PSERVICEGROUP m_ServiceGroup;
PPINCOUNT m_pPinCount;
PPOWERNOTIFY m_pPowerNotify;
@@ -233,12 +231,6 @@
this, DeviceObject, Irp, UnknownMiniport, UnknownAdapter, ResourceList);
PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
- if (m_bInitialized)
- {
- DPRINT("IPortWavePci_fnInit called again\n");
- return STATUS_SUCCESS;
- }
-
Status = UnknownMiniport->QueryInterface(IID_IMiniportWavePci,
(PVOID*)&Miniport);
if (!NT_SUCCESS(Status))
{
@@ -249,30 +241,20 @@
// Initialize port object
m_Miniport = Miniport;
m_pDeviceObject = DeviceObject;
- m_bInitialized = TRUE;
- m_pResourceList = ResourceList;
+
InitializeListHead(&m_EventList);
KeInitializeSpinLock(&m_EventListLock);
// increment reference on miniport adapter
Miniport->AddRef();
-
- if (ResourceList)
- {
- // increment reference on resource list
- ResourceList->AddRef();
- }
-
Status = Miniport->Init(UnknownAdapter, ResourceList, this, &ServiceGroup);
if (!NT_SUCCESS(Status))
{
DPRINT("IPortWavePci_fnInit failed with %x\n", Status);
- m_bInitialized = FALSE;
+
// release reference on miniport adapter
Miniport->Release();
- // increment reference on resource list
- ResourceList->Release();
return Status;
}
@@ -282,7 +264,6 @@
{
DPRINT("failed to get description\n");
Miniport->Release();
- m_bInitialized = FALSE;
return Status;
}
@@ -307,7 +288,6 @@
{
DPRINT("PcCreateSubdeviceDescriptor failed with %x\n", Status);
Miniport->Release();
- m_bInitialized = FALSE;
return Status;
}
@@ -360,12 +340,6 @@
{
DPRINT("IPortWavePci_fnNewRegistryKey entered\n");
PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
-
- if (!m_bInitialized)
- {
- DPRINT("IPortWavePci_fnNewRegistryKey called w/o initiazed\n");
- return STATUS_UNSUCCESSFUL;
- }
return PcNewRegistryKey(OutRegistryKey,
OuterUnknown,
@@ -388,12 +362,6 @@
{
DPRINT("IPortWavePci_fnGetDeviceProperty entered\n");
PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
-
- if (!m_bInitialized)
- {
- DPRINT("IPortWavePci_fnNewRegistryKey called w/o initiazed\n");
- return STATUS_UNSUCCESSFUL;
- }
return IoGetDeviceProperty(m_pDeviceObject, DeviceRegistryProperty, BufferLength,
PropertyBuffer, ReturnLength);
}
@@ -434,8 +402,6 @@
CPortWavePci::Notify(
IN PSERVICEGROUP ServiceGroup)
{
- //IPortWavePciImpl * This = (IPortWavePciImpl*)iface;
-
//DPRINT("IPortWavePci_fnNotify entered %p, ServiceGroup %p\n", This,
ServiceGroup);
if (ServiceGroup)
@@ -492,8 +458,6 @@
NTAPI
CPortWavePci::ReleaseChildren()
{
- //IPortWavePciImpl * This = (IPortWavePciImpl*)CONTAINING_RECORD(iface,
IPortWavePciImpl, lpVtblSubDevice);
-
UNIMPLEMENTED
return STATUS_UNSUCCESSFUL;
}