Commit d7fa1a46 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: hv: hv_mouse: use an anonymous union for struct mousevsc_prt_msg

Much nicer than having an ugly 'u.' in the structure usage, welcome to
the 2000's...

Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: K. Y. Srinivasan <kys@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent e93eff9c
...@@ -160,7 +160,7 @@ struct mousevsc_prt_msg { ...@@ -160,7 +160,7 @@ struct mousevsc_prt_msg {
struct synthhid_protocol_request Request; struct synthhid_protocol_request Request;
struct synthhid_protocol_response Response; struct synthhid_protocol_response Response;
struct synthhid_device_info_ack Ack; struct synthhid_device_info_ack Ack;
} u; };
}; };
/* /*
...@@ -385,9 +385,9 @@ static void MousevscOnReceiveDeviceInfo(struct mousevsc_dev *InputDevice, struct ...@@ -385,9 +385,9 @@ static void MousevscOnReceiveDeviceInfo(struct mousevsc_dev *InputDevice, struct
ack.PacketType = PipeMessageData; ack.PacketType = PipeMessageData;
ack.DataSize = sizeof(struct synthhid_device_info_ack); ack.DataSize = sizeof(struct synthhid_device_info_ack);
ack.u.Ack.header.type = SynthHidInitialDeviceInfoAck; ack.Ack.header.type = SynthHidInitialDeviceInfoAck;
ack.u.Ack.header.size = 1; ack.Ack.header.size = 1;
ack.u.Ack.reserved = 0; ack.Ack.reserved = 0;
ret = vmbus_sendpacket(InputDevice->Device->channel, ret = vmbus_sendpacket(InputDevice->Device->channel,
&ack, &ack,
...@@ -608,9 +608,9 @@ static int MousevscConnectToVsp(struct hv_device *Device) ...@@ -608,9 +608,9 @@ static int MousevscConnectToVsp(struct hv_device *Device)
request->PacketType = PipeMessageData; request->PacketType = PipeMessageData;
request->DataSize = sizeof(struct synthhid_protocol_request); request->DataSize = sizeof(struct synthhid_protocol_request);
request->u.Request.header.type = SynthHidProtocolRequest; request->Request.header.type = SynthHidProtocolRequest;
request->u.Request.header.size = sizeof(unsigned long); request->Request.header.size = sizeof(unsigned long);
request->u.Request.version_requested.version = SYNTHHID_INPUT_VERSION; request->Request.version_requested.version = SYNTHHID_INPUT_VERSION;
pr_info("synthhid protocol request..."); pr_info("synthhid protocol request...");
...@@ -635,7 +635,7 @@ static int MousevscConnectToVsp(struct hv_device *Device) ...@@ -635,7 +635,7 @@ static int MousevscConnectToVsp(struct hv_device *Device)
response = &inputDevice->ProtocolResp; response = &inputDevice->ProtocolResp;
if (!response->u.Response.approved) { if (!response->Response.approved) {
pr_err("synthhid protocol request failed (version %d)", pr_err("synthhid protocol request failed (version %d)",
SYNTHHID_INPUT_VERSION); SYNTHHID_INPUT_VERSION);
ret = -1; ret = -1;
......
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