[HAL]
authorThomas Faber <thomas.faber@reactos.org>
Mon, 7 Sep 2015 17:02:22 +0000 (17:02 +0000)
committerThomas Faber <thomas.faber@reactos.org>
Mon, 7 Sep 2015 17:02:22 +0000 (17:02 +0000)
- Addendum to r69013: also fix the ACPI version of HalpDispatchPower.
CORE-10105 CORE-10117

svn path=/trunk/; revision=69092

reactos/hal/halx86/acpi/halpnpdd.c

index d63093c..69cd896 100644 (file)
@@ -822,8 +822,23 @@ NTAPI
 HalpDispatchPower(IN PDEVICE_OBJECT DeviceObject,
                   IN PIRP Irp)
 {
+    PFDO_EXTENSION FdoExtension;
+
     DPRINT("HAL: PnP Driver Power!\n");
-    return STATUS_SUCCESS;
+    FdoExtension = DeviceObject->DeviceExtension;
+    if (FdoExtension->ExtensionType == FdoExtensionType)
+    {
+        PoStartNextPowerIrp(Irp);
+        IoSkipCurrentIrpStackLocation(Irp);
+        return PoCallDriver(FdoExtension->AttachedDeviceObject, Irp);
+    }
+    else
+    {
+        PoStartNextPowerIrp(Irp);
+        Irp->IoStatus.Status = STATUS_SUCCESS;
+        IoCompleteRequest(Irp, IO_NO_INCREMENT);
+        return STATUS_SUCCESS;
+    }
 }
 
 NTSTATUS