<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>
      <blockquote type="cite">
        <pre wrap="">+NTSTATUS PNP_RemoveDevice(minidriver <b class="moz-txt-star"><span class="moz-txt-tag">*</span>minidriver, DEVICE_OBJECT *device, IRP<span class="moz-txt-tag">*</span></b> irp)</pre>
      </blockquote>
      Hi Aric,</p>
    <p>It would be better if * is close to variable name consistantly.
      Also in the declaration.<br>
      <blockquote type="cite">
        <pre wrap="">
+{
+    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)</pre>
      </blockquote>
      Since we're removing the entry, shouldn't LIST_FOR_EACH_ENTRY_SAFE
      be used?</p>
    <p>Thanks,</p>
    <p>Zhiyi<br>
      <blockquote type="cite">
        <pre wrap="">
+    {
+        if (hiddev->device == device)
+        {
+            list_remove(&hiddev->entry);
+            HeapFree(GetProcessHeap(), 0, hiddev);
+            break;
+        }
+    }
+    return rc;
+}</pre>
      </blockquote>
      <br>
    </p>
    <p><br>
    </p>
    <br>
    <div class="moz-cite-prefix">在 2018/7/24 21:16, Aric Stewart 写道:<br>
    </div>
    <blockquote type="cite"
      cite="mid:82f814fd-6d3e-df2d-4d09-1b17b0192c1b@codeweavers.com">
      <pre wrap="">Signed-off-by: Aric Stewart <a class="moz-txt-link-rfc2396E" href="mailto:aric@codeweavers.com"><aric@codeweavers.com></a>
---
 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(-)


</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">
</pre>
    </blockquote>
    <br>
  </body>
</html>