[PORTCLS]
[reactos.git] / reactos / drivers / wdm / audio / backpln / portcls / power.cpp
index 6371952..2486221 100644 (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