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

Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zebediah Figura 2019-06-06 11:12:50 -04:00 committed by Alexandre Julliard
parent 700633ee0f
commit 3d011fcdff
3 changed files with 9 additions and 10 deletions

View File

@ -174,8 +174,7 @@ static void WINAPI read_cancel_routine(DEVICE_OBJECT *device, IRP *irp)
IoCompleteRequest(irp, IO_NO_INCREMENT); IoCompleteRequest(irp, IO_NO_INCREMENT);
} }
void HID_DeleteDevice(DEVICE_OBJECT *device)
void HID_DeleteDevice(HID_MINIDRIVER_REGISTRATION *driver, DEVICE_OBJECT *device)
{ {
BASE_DEVICE_EXTENSION *ext; BASE_DEVICE_EXTENSION *ext;
IRP *irp; IRP *irp;

View File

@ -94,7 +94,7 @@ minidriver* find_minidriver(DRIVER_OBJECT* driver) DECLSPEC_HIDDEN;
/* Internal device functions */ /* Internal device functions */
NTSTATUS HID_CreateDevice(DEVICE_OBJECT *native_device, HID_MINIDRIVER_REGISTRATION *driver, DEVICE_OBJECT **device) DECLSPEC_HIDDEN; NTSTATUS HID_CreateDevice(DEVICE_OBJECT *native_device, HID_MINIDRIVER_REGISTRATION *driver, DEVICE_OBJECT **device) DECLSPEC_HIDDEN;
NTSTATUS HID_LinkDevice(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; void HID_StartDeviceThread(DEVICE_OBJECT *device) DECLSPEC_HIDDEN;
NTSTATUS WINAPI HID_Device_ioctl(DEVICE_OBJECT *device, IRP *irp) DECLSPEC_HIDDEN; NTSTATUS WINAPI HID_Device_ioctl(DEVICE_OBJECT *device, IRP *irp) DECLSPEC_HIDDEN;

View File

@ -122,7 +122,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
if (status != STATUS_SUCCESS) if (status != STATUS_SUCCESS)
{ {
ERR("Minidriver AddDevice failed (%x)\n",status); ERR("Minidriver AddDevice failed (%x)\n",status);
HID_DeleteDevice(&minidriver->minidriver, device); HID_DeleteDevice(device);
return status; return status;
} }
@ -132,7 +132,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
if (status != STATUS_SUCCESS) if (status != STATUS_SUCCESS)
{ {
ERR("Minidriver failed to get Attributes(%x)\n",status); ERR("Minidriver failed to get Attributes(%x)\n",status);
HID_DeleteDevice(&minidriver->minidriver, device); HID_DeleteDevice(device);
return status; return status;
} }
@ -146,7 +146,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
if (status != STATUS_SUCCESS) if (status != STATUS_SUCCESS)
{ {
ERR("Cannot get Device Descriptor(%x)\n",status); ERR("Cannot get Device Descriptor(%x)\n",status);
HID_DeleteDevice(&minidriver->minidriver, device); HID_DeleteDevice(device);
return status; return status;
} }
for (i = 0; i < descriptor.bNumDescriptors; i++) 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) if (i >= descriptor.bNumDescriptors)
{ {
ERR("No Report Descriptor found in reply\n"); ERR("No Report Descriptor found in reply\n");
HID_DeleteDevice(&minidriver->minidriver, device); HID_DeleteDevice(device);
return status; return status;
} }
@ -166,7 +166,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
if (status != STATUS_SUCCESS) if (status != STATUS_SUCCESS)
{ {
ERR("Cannot get Report Descriptor(%x)\n",status); ERR("Cannot get Report Descriptor(%x)\n",status);
HID_DeleteDevice(&minidriver->minidriver, device); HID_DeleteDevice(device);
HeapFree(GetProcessHeap(), 0, reportDescriptor); HeapFree(GetProcessHeap(), 0, reportDescriptor);
return status; return status;
} }
@ -177,7 +177,7 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
if (!ext->preparseData) if (!ext->preparseData)
{ {
ERR("Cannot parse Report Descriptor\n"); ERR("Cannot parse Report Descriptor\n");
HID_DeleteDevice(&minidriver->minidriver, device); HID_DeleteDevice(device);
return STATUS_NOT_SUPPORTED; return STATUS_NOT_SUPPORTED;
} }
@ -217,7 +217,7 @@ NTSTATUS PNP_RemoveDevice(minidriver *minidriver, DEVICE_OBJECT *device, IRP *ir
if (irp) if (irp)
rc = minidriver->PNPDispatch(device, 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) LIST_FOR_EACH_ENTRY(hiddev, &minidriver->device_list, hid_device, entry)
{ {
if (hiddev->device == device) if (hiddev->device == device)