Commit 975e33c7 authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

hidclass.sys: Use nameless unions.

parent 1c5e57fc
......@@ -19,7 +19,6 @@
#include <stdarg.h>
#include <stdlib.h>
#define NONAMELESSUNION
#include "hid.h"
#include "wine/debug.h"
......
......@@ -18,7 +18,6 @@
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define NONAMELESSUNION
#include <unistd.h>
#include <stdarg.h>
#include <stdlib.h>
......@@ -91,7 +90,7 @@ static NTSTATUS get_device_id(DEVICE_OBJECT *device, BUS_QUERY_ID_TYPE type, WCH
wcscpy(id, (WCHAR *)irp_status.Information);
ExFreePool((WCHAR *)irp_status.Information);
return irp_status.u.Status;
return irp_status.Status;
}
/* user32 reserves 1 & 2 for winemouse and winekeyboard,
......@@ -123,9 +122,9 @@ static void send_wm_input_device_change(BASE_DEVICE_EXTENSION *ext, LPARAM param
((USAGE *)rawinput.data.hid.bRawData)[1] = ext->u.pdo.preparsed_data->caps.Usage;
input.type = INPUT_HARDWARE;
input.u.hi.uMsg = WM_INPUT_DEVICE_CHANGE;
input.u.hi.wParamH = 0;
input.u.hi.wParamL = 0;
input.hi.uMsg = WM_INPUT_DEVICE_CHANGE;
input.hi.wParamH = 0;
input.hi.wParamL = 0;
__wine_send_input(0, &input, &rawinput);
}
......@@ -312,7 +311,7 @@ static NTSTATUS fdo_pnp(DEVICE_OBJECT *device, IRP *irp)
if (!(devices = ExAllocatePool(PagedPool, offsetof(DEVICE_RELATIONS, Objects[1]))))
{
irp->IoStatus.u.Status = STATUS_NO_MEMORY;
irp->IoStatus.Status = STATUS_NO_MEMORY;
IoCompleteRequest(irp, IO_NO_INCREMENT);
return STATUS_NO_MEMORY;
}
......@@ -329,7 +328,7 @@ static NTSTATUS fdo_pnp(DEVICE_OBJECT *device, IRP *irp)
}
irp->IoStatus.Information = (ULONG_PTR)devices;
irp->IoStatus.u.Status = STATUS_SUCCESS;
irp->IoStatus.Status = STATUS_SUCCESS;
IoSkipCurrentIrpStackLocation(irp);
return IoCallDriver(ext->u.fdo.hid_ext.NextDeviceObject, irp);
}
......@@ -364,7 +363,7 @@ static NTSTATUS pdo_pnp(DEVICE_OBJECT *device, IRP *irp)
{
IO_STACK_LOCATION *irpsp = IoGetCurrentIrpStackLocation(irp);
BASE_DEVICE_EXTENSION *ext = device->DeviceExtension;
NTSTATUS status = irp->IoStatus.u.Status;
NTSTATUS status = irp->IoStatus.Status;
TRACE("irp %p, minor function %#x.\n", irp, irpsp->MinorFunction);
......@@ -482,13 +481,13 @@ static NTSTATUS pdo_pnp(DEVICE_OBJECT *device, IRP *irp)
while ((queued_irp = pop_irp_from_queue(ext)))
{
queued_irp->IoStatus.u.Status = STATUS_DEVICE_REMOVED;
queued_irp->IoStatus.Status = STATUS_DEVICE_REMOVED;
IoCompleteRequest(queued_irp, IO_NO_INCREMENT);
}
RtlFreeUnicodeString(&ext->u.pdo.link_name);
irp->IoStatus.u.Status = STATUS_SUCCESS;
irp->IoStatus.Status = STATUS_SUCCESS;
IoCompleteRequest(irp, IO_NO_INCREMENT);
IoDeleteDevice(device);
return STATUS_SUCCESS;
......@@ -502,7 +501,7 @@ static NTSTATUS pdo_pnp(DEVICE_OBJECT *device, IRP *irp)
FIXME("Unhandled minor function %#x.\n", irpsp->MinorFunction);
}
irp->IoStatus.u.Status = status;
irp->IoStatus.Status = status;
IoCompleteRequest( irp, IO_NO_INCREMENT );
return status;
}
......@@ -523,7 +522,7 @@ static NTSTATUS WINAPI driver_create(DEVICE_OBJECT *device, IRP *irp)
if (ext->is_fdo)
{
irp->IoStatus.u.Status = STATUS_UNSUCCESSFUL;
irp->IoStatus.Status = STATUS_UNSUCCESSFUL;
IoCompleteRequest(irp, IO_NO_INCREMENT);
return STATUS_UNSUCCESSFUL;
}
......@@ -608,5 +607,5 @@ NTSTATUS call_minidriver(ULONG code, DEVICE_OBJECT *device, void *in_buff, ULONG
if (IoCallDriver(device, irp) == STATUS_PENDING)
KeWaitForSingleObject(&event, Executive, KernelMode, FALSE, NULL);
return io.u.Status;
return io.Status;
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment