Commit 18bc44e3 authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: hv: hv_mouse: use a real struct hid_descriptor

The data coming from the vmbus is really a hid descriptor, so use that
structure instead of having to mess around with a character array and
pointer fun.

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 98ad91ed
...@@ -117,7 +117,7 @@ struct synthhid_protocol_response { ...@@ -117,7 +117,7 @@ struct synthhid_protocol_response {
struct synthhid_device_info { struct synthhid_device_info {
struct synthhid_msg_hdr header; struct synthhid_msg_hdr header;
struct hv_input_dev_info hid_dev_info; struct hv_input_dev_info hid_dev_info;
unsigned char HidDescriptorInformation[1]; struct hid_descriptor hid_descriptor;
}; };
struct synthhid_device_info_ack { struct synthhid_device_info_ack {
...@@ -352,7 +352,7 @@ static void MousevscOnReceiveDeviceInfo(struct mousevsc_dev *InputDevice, struct ...@@ -352,7 +352,7 @@ static void MousevscOnReceiveDeviceInfo(struct mousevsc_dev *InputDevice, struct
memcpy(&InputDevice->hid_dev_info, &DeviceInfo->hid_dev_info, sizeof(struct hv_input_dev_info)); memcpy(&InputDevice->hid_dev_info, &DeviceInfo->hid_dev_info, sizeof(struct hv_input_dev_info));
/* Save the hid desc */ /* Save the hid desc */
desc = (struct hid_descriptor *)DeviceInfo->HidDescriptorInformation; desc = &DeviceInfo->hid_descriptor;
WARN_ON(desc->bLength > 0); WARN_ON(desc->bLength > 0);
InputDevice->HidDesc = kzalloc(desc->bLength, GFP_KERNEL); InputDevice->HidDesc = kzalloc(desc->bLength, GFP_KERNEL);
......
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