Signed-off-by: Aric Stewart aric@codeweavers.com --- dlls/hidclass.sys/hid.h | 8 ++++++++ dlls/hidclass.sys/main.c | 8 ++++++++ dlls/hidclass.sys/pnp.c | 35 +++++++++++++++++++++++++++++++---- 3 files changed, 47 insertions(+), 4 deletions(-)
+NTSTATUS PNP_RemoveDevice(minidriver *minidriver, DEVICE_OBJECT *device, IRP* irp)
Hi Aric,
It would be better if * is close to variable name consistantly. Also in the declaration.
+{
- hid_device *hiddev;
- NTSTATUS rc = STATUS_NOT_SUPPORTED;
- if (irp)
rc = minidriver->PNPDispatch(device, irp);
- HID_DeleteDevice(&minidriver->minidriver, device);
- LIST_FOR_EACH_ENTRY(hiddev, &minidriver->device_list, hid_device, entry)
Since we're removing the entry, shouldn't LIST_FOR_EACH_ENTRY_SAFE be used?
Thanks,
Zhiyi
- {
if (hiddev->device == device)
{
list_remove(&hiddev->entry);
HeapFree(GetProcessHeap(), 0, hiddev);
break;
}
- }
- return rc;
+}
在 2018/7/24 21:16, Aric Stewart 写道:
Signed-off-by: Aric Stewart aric@codeweavers.com
dlls/hidclass.sys/hid.h | 8 ++++++++ dlls/hidclass.sys/main.c | 8 ++++++++ dlls/hidclass.sys/pnp.c | 35 +++++++++++++++++++++++++++++++---- 3 files changed, 47 insertions(+), 4 deletions(-)