Commit 746e8ca4 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: Make mousevsc_drv an instance of struct hv_driver

In preparation to eliminate struct mousevsc_drv_obj,
make struct mousevsc_drv an instance of struct
hv_driver.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarAbhishek Kane <v-abkane@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 8cd442d0
...@@ -428,14 +428,14 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device, ...@@ -428,14 +428,14 @@ static void mousevsc_on_receive_device_info(struct mousevsc_dev *input_device,
static void mousevsc_on_receive_input_report(struct mousevsc_dev *input_device, static void mousevsc_on_receive_input_report(struct mousevsc_dev *input_device,
struct synthhid_input_report *input_report) struct synthhid_input_report *input_report)
{ {
struct mousevsc_drv_obj *input_drv; struct hv_driver *input_drv;
if (!input_device->init_complete) { if (!input_device->init_complete) {
pr_info("Initialization incomplete...ignoring input_report msg"); pr_info("Initialization incomplete...ignoring input_report msg");
return; return;
} }
input_drv = drv_to_mousedrv(input_device->device->device.driver); input_drv = drv_to_hv_drv(input_device->device->device.driver);
inputreport_callback(input_device->device, inputreport_callback(input_device->device,
input_report->buffer, input_report->buffer,
...@@ -680,7 +680,7 @@ static int mousevsc_on_device_add(struct hv_device *device, ...@@ -680,7 +680,7 @@ static int mousevsc_on_device_add(struct hv_device *device,
{ {
int ret = 0; int ret = 0;
struct mousevsc_dev *input_dev; struct mousevsc_dev *input_dev;
struct mousevsc_drv_obj *input_drv; struct hv_driver *input_drv;
struct hv_input_dev_info dev_info; struct hv_input_dev_info dev_info;
input_dev = alloc_input_device(device); input_dev = alloc_input_device(device);
...@@ -720,7 +720,7 @@ static int mousevsc_on_device_add(struct hv_device *device, ...@@ -720,7 +720,7 @@ static int mousevsc_on_device_add(struct hv_device *device,
return ret; return ret;
} }
input_drv = drv_to_mousedrv(input_dev->device->device.driver); input_drv = drv_to_hv_drv(input_dev->device->device.driver);
dev_info.vendor = input_dev->hid_dev_info.vendor; dev_info.vendor = input_dev->hid_dev_info.vendor;
dev_info.product = input_dev->hid_dev_info.product; dev_info.product = input_dev->hid_dev_info.product;
...@@ -943,14 +943,14 @@ static int mousevsc_drv_exit_cb(struct device *dev, void *data) ...@@ -943,14 +943,14 @@ static int mousevsc_drv_exit_cb(struct device *dev, void *data)
return 1; return 1;
} }
static struct mousevsc_drv_obj mousevsc_drv = { static struct hv_driver mousevsc_drv = {
.base.probe = mousevsc_probe, .probe = mousevsc_probe,
.base.remove = mousevsc_remove, .remove = mousevsc_remove,
}; };
static void mousevsc_drv_exit(void) static void mousevsc_drv_exit(void)
{ {
struct hv_driver *drv = &mousevsc_drv.base; struct hv_driver *drv = &mousevsc_drv;
int ret; int ret;
struct device *current_dev = NULL; struct device *current_dev = NULL;
...@@ -979,7 +979,7 @@ static void mousevsc_drv_exit(void) ...@@ -979,7 +979,7 @@ static void mousevsc_drv_exit(void)
static int __init mousevsc_init(void) static int __init mousevsc_init(void)
{ {
struct hv_driver *drv = &mousevsc_drv.base; struct hv_driver *drv = &mousevsc_drv;
DPRINT_INFO(INPUTVSC_DRV, "Hyper-V Mouse driver initializing."); DPRINT_INFO(INPUTVSC_DRV, "Hyper-V Mouse driver initializing.");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment