From 97903e7f54c64fa693b2db97bc063cb2986a15ff Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Thu, 29 Sep 2011 11:55:01 -0700 Subject: [PATCH] --- yaml --- r: 268673 b: refs/heads/master c: 6e56f27c09ec695fd0091476772e38fe9ccaa5a9 h: refs/heads/master i: 268671: 3f1ae0d83c482de13fa8fab25deae9b3ef9cdd75 v: v3 --- [refs] | 2 +- trunk/drivers/staging/hv/hv_mouse.c | 27 ++++++++------------------- 2 files changed, 9 insertions(+), 20 deletions(-) diff --git a/[refs] b/[refs] index 038390b05dcd..61f9a55d747f 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 517812b448e56d71185028445f8feb722bcd17a2 +refs/heads/master: 6e56f27c09ec695fd0091476772e38fe9ccaa5a9 diff --git a/trunk/drivers/staging/hv/hv_mouse.c b/trunk/drivers/staging/hv/hv_mouse.c index 662132606bc9..a526ba5ced3d 100644 --- a/trunk/drivers/staging/hv/hv_mouse.c +++ b/trunk/drivers/staging/hv/hv_mouse.c @@ -270,28 +270,13 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device, complete(&input_device->wait_event); } -static void mousevsc_on_receive_input_report(struct mousevsc_dev *input_device, - struct synthhid_input_report *input_report) -{ - struct hv_driver *input_drv; - - if (!input_device->init_complete) - return; - - input_drv = drv_to_hv_drv(input_device->device->device.driver); - - - hid_input_report(input_device->hid_device, - HID_INPUT_REPORT, input_report->buffer, input_report->header.size, 1); - -} - static void mousevsc_on_receive(struct hv_device *device, struct vmpacket_descriptor *packet) { struct pipe_prt_msg *pipe_msg; struct synthhid_msg *hid_msg; struct mousevsc_dev *input_dev = hv_get_drvdata(device); + struct synthhid_input_report *input_report; pipe_msg = (struct pipe_prt_msg *)((unsigned long)packet + (packet->offset8 << 3)); @@ -320,9 +305,13 @@ static void mousevsc_on_receive(struct hv_device *device, (struct synthhid_device_info *)&pipe_msg->data[0]); break; case SYNTH_HID_INPUT_REPORT: - mousevsc_on_receive_input_report(input_dev, - (struct synthhid_input_report *)&pipe_msg->data[0]); - + input_report = + (struct synthhid_input_report *)&pipe_msg->data[0]; + if (!input_dev->init_complete) + break; + hid_input_report(input_dev->hid_device, + HID_INPUT_REPORT, input_report->buffer, + input_report->header.size, 1); break; default: pr_err("unsupported hid msg type - type %d len %d",