hidclass.sys: Do not send IRP_MJ_PNP ioctls.

That is the Plug and Play Manager's job.

Signed-off-by: Aric Stewart <aric@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Aric Stewart 2016-08-12 08:20:01 -05:00 committed by Alexandre Julliard
parent ab3b9bd84d
commit 3036cfef2f
1 changed files with 0 additions and 29 deletions

View File

@ -75,22 +75,6 @@ static NTSTATUS SendDeviceIRP(DEVICE_OBJECT* device, IRP *irp)
return status;
}
static NTSTATUS PNP_SendPnPIRP(DEVICE_OBJECT *device, UCHAR minor)
{
IO_STACK_LOCATION *irpsp;
IO_STATUS_BLOCK irp_status;
IRP *irp = IoBuildSynchronousFsdRequest(IRP_MJ_PNP, device, NULL, 0, NULL, NULL, &irp_status);
irpsp = IoGetNextIrpStackLocation(irp);
irpsp->MinorFunction = minor;
irpsp->Parameters.StartDevice.AllocatedResources = NULL;
irpsp->Parameters.StartDevice.AllocatedResourcesTranslated = NULL;
return SendDeviceIRP(device, irp);
}
static NTSTATUS PNP_SendPowerIRP(DEVICE_OBJECT *device, DEVICE_POWER_STATE power)
{
IO_STATUS_BLOCK irp_status;
@ -183,22 +167,12 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
return status;
}
status = PNP_SendPnPIRP(device, IRP_MN_START_DEVICE);
if (status != STATUS_SUCCESS)
{
ERR("Minidriver IRP_MN_START_DEVICE failed (%x)\n",status);
HeapFree(GetProcessHeap(), 0, PDO_id);
HID_DeleteDevice(&minidriver->minidriver, device);
return status;
}
status = call_minidriver(IOCTL_HID_GET_DEVICE_ATTRIBUTES, device,
NULL, 0, &attr, sizeof(attr));
if (status != STATUS_SUCCESS)
{
ERR("Minidriver failed to get Attributes(%x)\n",status);
PNP_SendPnPIRP(device, IRP_MN_REMOVE_DEVICE);
HID_DeleteDevice(&minidriver->minidriver, device);
HeapFree(GetProcessHeap(), 0, PDO_id);
return status;
@ -220,7 +194,6 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
if (status != STATUS_SUCCESS)
{
ERR("Cannot get Device Descriptor(%x)\n",status);
PNP_SendPnPIRP(device, IRP_MN_REMOVE_DEVICE);
HID_DeleteDevice(&minidriver->minidriver, device);
HeapFree(GetProcessHeap(), 0, PDO_id);
return status;
@ -232,7 +205,6 @@ NTSTATUS WINAPI PNP_AddDevice(DRIVER_OBJECT *driver, DEVICE_OBJECT *PDO)
if (i >= descriptor.bNumDescriptors)
{
ERR("No Report Descriptor found in reply\n");
PNP_SendPnPIRP(device, IRP_MN_REMOVE_DEVICE);
HID_DeleteDevice(&minidriver->minidriver, device);
HeapFree(GetProcessHeap(), 0, PDO_id);
return status;
@ -296,7 +268,6 @@ void PNP_CleanupPNP(DRIVER_OBJECT *driver)
{
list_remove(&tracked_device->entry);
PNP_SendPowerIRP(tracked_device->FDO, PowerDeviceD3);
PNP_SendPnPIRP(tracked_device->FDO, IRP_MN_REMOVE_DEVICE);
HID_DeleteDevice(tracked_device->minidriver, tracked_device->FDO);
HeapFree(GetProcessHeap(), 0, tracked_device);
}