[PORTCLS]

- implement & export PcUnregisterAdapterPowerManagement

svn path=/trunk/; revision=68331
This commit is contained in:
Johannes Anderwald 2015-07-02 15:35:19 +00:00
parent 0c4a5a1f46
commit d2374e8208
2 changed files with 25 additions and 0 deletions

View file

@ -41,6 +41,7 @@
; Power Management
@ stdcall PcRegisterAdapterPowerManagement(ptr ptr)
@ stdcall PcRequestNewPowerState(ptr long)
@ stdcall PcUnregisterAdapterPowerManagement(ptr)
; Properties
@ stdcall PcCompletePendingPropertyRequest(ptr long)

View file

@ -48,6 +48,30 @@ PcRegisterAdapterPowerManagement(
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