Attach the PDOs to device stack and report device unique IDs if available.
Modified: trunk/reactos/drivers/bus/acpi/ospm/fdo.c

Modified: trunk/reactos/drivers/bus/acpi/ospm/fdo.c
--- trunk/reactos/drivers/bus/acpi/ospm/fdo.c	2005-03-19 23:52:04 UTC (rev 14206)
+++ trunk/reactos/drivers/bus/acpi/ospm/fdo.c	2005-03-20 00:33:36 UTC (rev 14207)
@@ -60,12 +60,7 @@
            L"ACPI\\%S",
            Node->device.id.hid);
 
-  if (!AcpiCreateUnicodeString(DeviceID, Buffer, PagedPool))
-  {
-    return FALSE;
-  }
-
-  return TRUE;
+  return AcpiCreateUnicodeString(DeviceID, Buffer, PagedPool);
 }
 
 
@@ -108,8 +103,15 @@
 AcpiCreateInstanceIDString(PUNICODE_STRING InstanceID,
                            BM_NODE *Node)
 {
-  /* FIXME: Create unique instnce id. */
-  return AcpiCreateUnicodeString(InstanceID, L"0000", PagedPool);
+  WCHAR Buffer[10];
+
+  if (Node->device.id.uid[0])
+    swprintf(Buffer, L"%S", Node->device.id.uid);
+  else
+    /* FIXME: Generate unique id! */
+    swprintf(Buffer, L"0000");
+
+  return AcpiCreateUnicodeString(InstanceID, Buffer, PagedPool);
 }
 
 
@@ -188,8 +190,8 @@
 
       PdoDeviceExtension->Common.DevicePowerState = PowerDeviceD0;
 
-//      PdoDeviceExtension->Common.Ldo = IoAttachDeviceToDeviceStack(DeviceObject,
-//                                                                   Device->Pdo);
+      PdoDeviceExtension->Common.Ldo = IoAttachDeviceToDeviceStack(DeviceObject,
+                                                                   Device->Pdo);
 
       RtlInitUnicodeString(&PdoDeviceExtension->DeviceID, NULL);
       RtlInitUnicodeString(&PdoDeviceExtension->InstanceID, NULL);