Author: janderwald
Date: Thu Jul 2 15:35:19 2015
New Revision: 68331
URL:
http://svn.reactos.org/svn/reactos?rev=68331&view=rev
Log:
[PORTCLS]
- implement & export PcUnregisterAdapterPowerManagement
Modified:
trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.spec
trunk/reactos/drivers/wdm/audio/backpln/portcls/power.cpp
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.spec [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/portcls.spec [iso-8859-1] Thu Jul 2
15:35:19 2015
@@ -41,6 +41,7 @@
; Power Management
@ stdcall PcRegisterAdapterPowerManagement(ptr ptr)
@ stdcall PcRequestNewPowerState(ptr long)
+@ stdcall PcUnregisterAdapterPowerManagement(ptr)
; Properties
@ stdcall PcCompletePendingPropertyRequest(ptr long)
Modified: trunk/reactos/drivers/wdm/audio/backpln/portcls/power.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/backpln/…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/backpln/portcls/power.cpp [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/backpln/portcls/power.cpp [iso-8859-1] Thu Jul 2
15:35:19 2015
@@ -48,6 +48,30 @@
return STATUS_SUCCESS;
}
+NTSTATUS
+NTAPI
+PcUnregisterAdapterPowerManagement(
+ IN PDEVICE_OBJECT DeviceObject)
+{
+ PPCLASS_DEVICE_EXTENSION DeviceExt;
+
+ DPRINT("PcUnregisterAdapterPowerManagement pUnknown %p pvContext %p\n",
DeviceObject);
+ PC_ASSERT_IRQL_EQUAL(PASSIVE_LEVEL);
+
+ if (!DeviceObject)
+ return STATUS_INVALID_PARAMETER;
+
+ DeviceExt = (PPCLASS_DEVICE_EXTENSION)DeviceObject->DeviceExtension;
+
+ if (DeviceExt->AdapterPowerManagement)
+ {
+ DeviceExt->AdapterPowerManagement->Release();
+ }
+ DeviceExt->AdapterPowerManagement = NULL;
+ return STATUS_SUCCESS;
+}
+
+
static
VOID