Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 236240
b: refs/heads/master
c: 7ced481
h: refs/heads/master
v: v3
  • Loading branch information
Greg Kroah-Hartman committed Mar 3, 2011
1 parent 086792d commit f4b8d9f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 52 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: e6f83b78ec7d8a6201caf0e190d1317aaf24b299
refs/heads/master: 7ced4810f9a86bb0324568052c6bf27292512b43
71 changes: 20 additions & 51 deletions trunk/drivers/staging/hv/hv_mouse.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,6 @@ struct mousevsc_drv_obj {
};


/*
* Interface
*/
int mouse_vsc_initialize(struct hv_driver *drv);

/* The maximum size of a synthetic input message. */
#define SYNTHHID_MAX_INPUT_REPORT_SIZE 16

Expand Down Expand Up @@ -347,16 +342,7 @@ static inline struct mousevsc_dev *FinalReleaseInputDevice(struct hv_device *Dev
return inputDevice;
}

/*
*
* Name:
* MousevscInitialize()
*
* Description:
* Main entry point
*
*/
int mouse_vsc_initialize(struct hv_driver *Driver)
static int mouse_vsc_initialize(struct hv_driver *Driver)
{
struct mousevsc_drv_obj *inputDriver =
(struct mousevsc_drv_obj *)Driver;
Expand Down Expand Up @@ -1054,39 +1040,6 @@ void mousevsc_reportdesc_callback(struct hv_device *dev, void *packet, u32 len)
kfree(hid_dev);
}

/*
*
* Name: mousevsc_drv_init()
*
* Desc: Driver initialization.
*/
int mousevsc_drv_init(int (*pfn_drv_init)(struct hv_driver *pfn_drv_init))
{
int ret = 0;
struct mousevsc_drv_obj *input_drv_obj = &g_mousevsc_drv.drv_obj;
struct driver_context *drv_ctx = &g_mousevsc_drv.drv_ctx;

input_drv_obj->OnDeviceInfo = mousevsc_deviceinfo_callback;
input_drv_obj->OnInputReport = mousevsc_inputreport_callback;
input_drv_obj->OnReportDescriptor = mousevsc_reportdesc_callback;

/* Callback to client driver to complete the initialization */
pfn_drv_init(&input_drv_obj->Base);

drv_ctx->driver.name = input_drv_obj->Base.name;
memcpy(&drv_ctx->class_id, &input_drv_obj->Base.dev_type,
sizeof(struct hv_guid));

drv_ctx->probe = mousevsc_probe;
drv_ctx->remove = mousevsc_remove;

/* The driver belongs to vmbus */
vmbus_child_driver_register(drv_ctx);

return ret;
}


int mousevsc_drv_exit_cb(struct device *dev, void *data)
{
struct device **curr = (struct device **)data;
Expand Down Expand Up @@ -1130,13 +1083,29 @@ void mousevsc_drv_exit(void)

static int __init mousevsc_init(void)
{
int ret;
struct mousevsc_drv_obj *input_drv_obj = &g_mousevsc_drv.drv_obj;
struct driver_context *drv_ctx = &g_mousevsc_drv.drv_ctx;

DPRINT_INFO(INPUTVSC_DRV, "Hyper-V Mouse driver initializing.");

ret = mousevsc_drv_init(mouse_vsc_initialize);
input_drv_obj->OnDeviceInfo = mousevsc_deviceinfo_callback;
input_drv_obj->OnInputReport = mousevsc_inputreport_callback;
input_drv_obj->OnReportDescriptor = mousevsc_reportdesc_callback;

return ret;
/* Callback to client driver to complete the initialization */
mouse_vsc_initialize(&input_drv_obj->Base);

drv_ctx->driver.name = input_drv_obj->Base.name;
memcpy(&drv_ctx->class_id, &input_drv_obj->Base.dev_type,
sizeof(struct hv_guid));

drv_ctx->probe = mousevsc_probe;
drv_ctx->remove = mousevsc_remove;

/* The driver belongs to vmbus */
vmbus_child_driver_register(drv_ctx);

return 0;
}

static void __exit mousevsc_exit(void)
Expand Down

0 comments on commit f4b8d9f

Please sign in to comment.