[PATCH 669/961] Staging: hv: hv_mouse: use a real struct hid_descriptor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
Cc: K. Y. Srinivasan <kys@xxxxxxxxxxxxx>
Cc: Haiyang Zhang <haiyangz@xxxxxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxx>
---
 drivers/staging/hv/hv_mouse.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index 2ed67d9..90badf6 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -117,7 +117,7 @@ struct synthhid_protocol_response {
 struct synthhid_device_info {
 	struct synthhid_msg_hdr header;
 	struct hv_input_dev_info hid_dev_info;
-	unsigned char               HidDescriptorInformation[1];
+	struct hid_descriptor hid_descriptor;
 };
 
 struct synthhid_device_info_ack {
@@ -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));
 
 	/* Save the hid desc */
-	desc = (struct hid_descriptor *)DeviceInfo->HidDescriptorInformation;
+	desc = &DeviceInfo->hid_descriptor;
 	WARN_ON(desc->bLength > 0);
 
 	InputDevice->HidDesc = kzalloc(desc->bLength, GFP_KERNEL);
-- 
1.7.4.1

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel


[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux