aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/staging/hv/hv_mouse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 2ed67d93aed..90badf69e88 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -117,7 +117,7 @@ struct synthhid_protocol_response {
117struct synthhid_device_info { 117struct synthhid_device_info {
118 struct synthhid_msg_hdr header; 118 struct synthhid_msg_hdr header;
119 struct hv_input_dev_info hid_dev_info; 119 struct hv_input_dev_info hid_dev_info;
120 unsigned char HidDescriptorInformation[1]; 120 struct hid_descriptor hid_descriptor;
121}; 121};
122 122
123struct synthhid_device_info_ack { 123struct synthhid_device_info_ack {
@@ -352,7 +352,7 @@ static void MousevscOnReceiveDeviceInfo(struct mousevsc_dev *InputDevice, struct
352 memcpy(&InputDevice->hid_dev_info, &DeviceInfo->hid_dev_info, sizeof(struct hv_input_dev_info)); 352 memcpy(&InputDevice->hid_dev_info, &DeviceInfo->hid_dev_info, sizeof(struct hv_input_dev_info));
353 353
354 /* Save the hid desc */ 354 /* Save the hid desc */
355 desc = (struct hid_descriptor *)DeviceInfo->HidDescriptorInformation; 355 desc = &DeviceInfo->hid_descriptor;
356 WARN_ON(desc->bLength > 0); 356 WARN_ON(desc->bLength > 0);
357 357
358 InputDevice->HidDesc = kzalloc(desc->bLength, GFP_KERNEL); 358 InputDevice->HidDesc = kzalloc(desc->bLength, GFP_KERNEL);