Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267976
b: refs/heads/master
c: 4bc6940
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Aug 25, 2011
1 parent 37f693e commit be0ba33
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f00c5460b46b6068d0005ba29fe39e77e4fdbd0b
refs/heads/master: 4bc694057bc95049ed8d451c2e142c79bbf97328
34 changes: 10 additions & 24 deletions trunk/drivers/staging/hv/hv_mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,13 @@ struct mousevsc_dev {
struct hv_input_dev_info hid_dev_info;
};

struct input_device_context {
struct hv_device *device_ctx;
struct hid_device *hid_device;
struct hv_input_dev_info device_info;
int connected;
};

static void deviceinfo_callback(struct hv_device *dev, struct hv_input_dev_info *info);
static void inputreport_callback(struct hv_device *dev, void *packet, u32 len);
static void reportdesc_callback(struct hv_device *dev, void *packet, u32 len);

Expand Down Expand Up @@ -651,6 +656,7 @@ static int mousevsc_on_device_add(struct hv_device *device,
struct mousevsc_dev *input_dev;
struct hv_driver *input_drv;
struct hv_input_dev_info dev_info;
struct input_device_context *input_device_ctx;

input_dev = alloc_input_device(device);

Expand Down Expand Up @@ -697,7 +703,9 @@ static int mousevsc_on_device_add(struct hv_device *device,
strcpy(dev_info.name, "Microsoft Vmbus HID-compliant Mouse");

/* Send the device info back up */
deviceinfo_callback(device, &dev_info);
input_device_ctx = dev_get_drvdata(&device->device);
memcpy(&input_device_ctx->device_info, &dev_info,
sizeof(struct hv_input_dev_info));

/* Send the report desc back up */
/* workaround SA-167 */
Expand Down Expand Up @@ -752,28 +760,6 @@ static int mousevsc_on_device_remove(struct hv_device *device)
}


/*
* Data types
*/
struct input_device_context {
struct hv_device *device_ctx;
struct hid_device *hid_device;
struct hv_input_dev_info device_info;
int connected;
};


static void deviceinfo_callback(struct hv_device *dev, struct hv_input_dev_info *info)
{
struct input_device_context *input_device_ctx =
dev_get_drvdata(&dev->device);

memcpy(&input_device_ctx->device_info, info,
sizeof(struct hv_input_dev_info));

DPRINT_INFO(INPUTVSC_DRV, "%s", __func__);
}

static void inputreport_callback(struct hv_device *dev, void *packet, u32 len)
{
int ret = 0;
Expand Down

0 comments on commit be0ba33

Please sign in to comment.