[bus] Add FDO member to bus structure
authorShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Tue, 21 Dec 2010 21:44:49 +0000 (16:44 -0500)
committerShao Miller <Shao.Miller@yrdsb.edu.on.ca>
Tue, 21 Dec 2010 21:44:49 +0000 (16:44 -0500)
In a possibly eventual effort to move away from WV_S_DEV_T

src/include/bus.h
src/winvblock/driver.c

index c9b849c..924ee19 100644 (file)
@@ -43,6 +43,7 @@ typedef struct WV_BUS_T {
     WV_S_DEV_T Dev;
     PDEVICE_OBJECT LowerDeviceObject;
     PDEVICE_OBJECT PhysicalDeviceObject;
+    PDEVICE_OBJECT Fdo;
     winvblock__uint32 Children;
     WV_SP_DEV_T first_child;
     WV_FP_BUS_THREAD Thread;
index 394128e..ecfc554 100644 (file)
@@ -184,7 +184,7 @@ static NTSTATUS STDCALL driver__attach_fdo_(
       }
     /* Set associations for the bus, device, FDO, PDO. */
     WvDevForDevObj(fdo, &bus->Dev);
-    bus->Dev.Self = fdo;
+    bus->Dev.Self = bus->Fdo = fdo;
     bus->PhysicalDeviceObject = PhysicalDeviceObject;
     fdo->Flags |= DO_DIRECT_IO;         /* FIXME? */
     fdo->Flags |= DO_POWER_INRUSH;      /* FIXME? */