Zebediah Figura : hidclass.sys: Set PhysicalDeviceObject to the bus PDO.

Alexandre Julliard julliard at winehq.org
Mon Apr 19 15:38:11 CDT 2021


Module: wine
Branch: master
Commit: 06ab0677587fbbb83ef73efa7ed22bf85dcb6836
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=06ab0677587fbbb83ef73efa7ed22bf85dcb6836

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Sat Apr 17 19:43:27 2021 -0500

hidclass.sys: Set PhysicalDeviceObject to the bus PDO.

Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/hidclass.sys/pnp.c              | 2 +-
 dlls/ntoskrnl.exe/tests/driver_hid.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c
index b9208d146e6..7b365d267ed 100644
--- a/dlls/hidclass.sys/pnp.c
+++ b/dlls/hidclass.sys/pnp.c
@@ -135,7 +135,7 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b
     ext = fdo->DeviceExtension;
     ext->is_fdo = TRUE;
     ext->u.fdo.hid_ext.MiniDeviceExtension = ext + 1;
-    ext->u.fdo.hid_ext.PhysicalDeviceObject = fdo;
+    ext->u.fdo.hid_ext.PhysicalDeviceObject = bus_pdo;
     ext->u.fdo.hid_ext.NextDeviceObject = bus_pdo;
     swprintf(ext->device_id, ARRAY_SIZE(ext->device_id), L"HID\\%s", wcsrchr(device_id, '\\') + 1);
     wcscpy(ext->instance_id, instance_id);
diff --git a/dlls/ntoskrnl.exe/tests/driver_hid.c b/dlls/ntoskrnl.exe/tests/driver_hid.c
index 7ddf49f4dcc..92637f9d0bc 100644
--- a/dlls/ntoskrnl.exe/tests/driver_hid.c
+++ b/dlls/ntoskrnl.exe/tests/driver_hid.c
@@ -215,7 +215,7 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *f
 
     /* We should be given the FDO, not the PDO. */
     ok(!!ext->PhysicalDeviceObject, "expected non-NULL pdo\n");
-    todo_wine ok(ext->NextDeviceObject == ext->PhysicalDeviceObject, "got pdo %p, next %p\n",
+    ok(ext->NextDeviceObject == ext->PhysicalDeviceObject, "got pdo %p, next %p\n",
             ext->PhysicalDeviceObject, ext->NextDeviceObject);
     todo_wine ok(ext->NextDeviceObject->AttachedDevice == fdo, "wrong attached device\n");
 




More information about the wine-cvs mailing list