Zebediah Figura : hidclass.sys: Get rid of unused minidriver parameter to HID_DeleteDevice().

Alexandre Julliard julliard at winehq.org
Thu Jun 6 17:05:19 CDT 2019


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

Author: Zebediah Figura <z.figura12 at gmail.com>
Date:   Thu Jun  6 11:12:50 2019 -0400

hidclass.sys: Get rid of unused minidriver parameter to HID_DeleteDevice().

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

---

 dlls/hidclass.sys/device.c |  3 +--
 dlls/hidclass.sys/hid.h    |  2 +-
 dlls/hidclass.sys/pnp.c    | 14 +++++++-------
 3 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/dlls/hidclass.sys/device.c b/dlls/hidclass.sys/device.c
index 93187b5..e961772 100644
--- a/dlls/hidclass.sys/device.c
+++ b/dlls/hidclass.sys/device.c
@@ -174,8 +174,7 @@ static void WINAPI read_cancel_routine(DEVICE_OBJECT *device, IRP *irp)
     IoCompleteRequest(irp, IO_NO_INCREMENT);
 }
 
-
-void HID_DeleteDevice(HID_MINIDRIVER_REGISTRATION *driver, DEVICE_OBJECT *device)
+void HID_DeleteDevice(DEVICE_OBJECT *device)
 {
     BASE_DEVICE_EXTENSION *ext;
     IRP *irp;
diff --git a/dlls/hidclass.sys/hid.h b/dlls/hidclass.sys/hid.h
index b9bf135..0f82323 100644
--- a/dlls/hidclass.sys/hid.h
+++ b/dlls/hidclass.sys/hid.h
@@ -94,7 +94,7 @@ minidriver* find_minidriver(DRIVER_OBJECT* driver) DECLSPEC_HIDDEN;
 /* Internal device functions */
 NTSTATUS HID_CreateDevice(DEVICE_OBJECT *native_device, HID_MINIDRIVER_REGISTRATION *driver, DEVICE_OBJECT **device) DECLSPEC_HIDDEN;
 NTSTATUS HID_LinkDevice(DEVICE_OBJECT *device) DECLSPEC_HIDDEN;
-void HID_DeleteDevice(HID_MINIDRIVER_REGISTRATION *driver, DEVICE_OBJECT *device) DECLSPEC_HIDDEN;
+void HID_DeleteDevice(DEVICE_OBJECT *device) DECLSPEC_HIDDEN;
 void HID_StartDeviceThread(DEVICE_OBJECT *device) DECLSPEC_HIDDEN;
 
 NTSTATUS WINAPI HID_Device_ioctl(DEVICE_OBJECT *device, IRP *irp) DECLSPEC_HIDDEN;
diff --git a/dlls/hidclass.sys/pnp.c b/dlls/hidclass.sys/pnp.c
index 826ade9..8265efd 100644
--- a/dlls/hidclass.sys/pnp.c
+++ b/dlls/hidclass.sys/pnp.c
@@ -122,7 +122,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
     if (status != STATUS_SUCCESS)
     {
         ERR("Minidriver AddDevice failed (%x)\n",status);
-        HID_DeleteDevice(&minidriver->minidriver, device);
+        HID_DeleteDevice(device);
         return status;
     }
 
@@ -132,7 +132,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
     if (status != STATUS_SUCCESS)
     {
         ERR("Minidriver failed to get Attributes(%x)\n",status);
-        HID_DeleteDevice(&minidriver->minidriver, device);
+        HID_DeleteDevice(device);
         return status;
     }
 
@@ -146,7 +146,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
     if (status != STATUS_SUCCESS)
     {
         ERR("Cannot get Device Descriptor(%x)\n",status);
-        HID_DeleteDevice(&minidriver->minidriver, device);
+        HID_DeleteDevice(device);
         return status;
     }
     for (i = 0; i < descriptor.bNumDescriptors; i++)
@@ -156,7 +156,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
     if (i >= descriptor.bNumDescriptors)
     {
         ERR("No Report Descriptor found in reply\n");
-        HID_DeleteDevice(&minidriver->minidriver, device);
+        HID_DeleteDevice(device);
         return status;
     }
 
@@ -166,7 +166,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
     if (status != STATUS_SUCCESS)
     {
         ERR("Cannot get Report Descriptor(%x)\n",status);
-        HID_DeleteDevice(&minidriver->minidriver, device);
+        HID_DeleteDevice(device);
         HeapFree(GetProcessHeap(), 0, reportDescriptor);
         return status;
     }
@@ -177,7 +177,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
     if (!ext->preparseData)
     {
         ERR("Cannot parse Report Descriptor\n");
-        HID_DeleteDevice(&minidriver->minidriver, device);
+        HID_DeleteDevice(device);
         return STATUS_NOT_SUPPORTED;
     }
 
@@ -217,7 +217,7 @@ NTSTATUS PNP_RemoveDevice(minidriver *minidriver, DEVICE_OBJECT *device, IRP *ir
 
     if (irp)
         rc = minidriver->PNPDispatch(device, irp);
-    HID_DeleteDevice(&minidriver->minidriver, device);
+    HID_DeleteDevice(device);
     LIST_FOR_EACH_ENTRY(hiddev,  &minidriver->device_list, hid_device, entry)
     {
         if (hiddev->device == device)




More information about the wine-cvs mailing list