public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH 09/16] Staging: hv: Eliminate mousevsc_driver_context
@ 2011-03-07 21:33 K. Y. Srinivasan
  0 siblings, 0 replies; 2+ messages in thread
From: K. Y. Srinivasan @ 2011-03-07 21:33 UTC (permalink / raw)
  To: kys, gregkh, linux-kernel, devel, virtualization
  Cc: Abhishek Kane, Haiyang Zhang, Hank Janssen

With the consolidation of all driver state into one data structure;
mousevsc_driver_context structure is not needed; get rid of it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
 drivers/staging/hv/hv_mouse.c |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index f762a8a..6c5c00d 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -777,11 +777,8 @@ struct input_device_context {
 	int			connected;
 };
 
-struct mousevsc_driver_context {
-	struct mousevsc_drv_obj	drv_obj;
-};
 
-static struct mousevsc_driver_context g_mousevsc_drv;
+static struct  mousevsc_drv_obj g_mousevsc_drv;
 
 static void deviceinfo_callback(struct hv_device *dev, struct hv_input_dev_info *info)
 {
@@ -824,9 +821,7 @@ static int mousevsc_probe(struct device *device)
 
 	struct hv_driver *drv =
 		drv_to_hv_drv(device->driver);
-	struct mousevsc_driver_context *mousevsc_drv_ctx =
-		(struct mousevsc_driver_context *)drv->priv;
-	struct mousevsc_drv_obj *mousevsc_drv_obj = &mousevsc_drv_ctx->drv_obj;
+	struct mousevsc_drv_obj *mousevsc_drv_obj = drv->priv;
 
 	struct vm_device *device_ctx = device_to_vm_device(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
@@ -855,9 +850,7 @@ static int mousevsc_remove(struct device *device)
 
 	struct hv_driver *drv =
 		drv_to_hv_drv(device->driver);
-	struct mousevsc_driver_context *mousevsc_drv_ctx =
-		(struct mousevsc_driver_context *)drv->priv;
-	struct mousevsc_drv_obj *mousevsc_drv_obj = &mousevsc_drv_ctx->drv_obj;
+	struct mousevsc_drv_obj *mousevsc_drv_obj = drv->priv;
 
 	struct vm_device *device_ctx = device_to_vm_device(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
@@ -956,8 +949,8 @@ static int mousevsc_drv_exit_cb(struct device *dev, void *data)
 
 static void mousevsc_drv_exit(void)
 {
-	struct mousevsc_drv_obj *mousevsc_drv_obj = &g_mousevsc_drv.drv_obj;
-	struct hv_driver *drv = &g_mousevsc_drv.drv_obj.Base;
+	struct mousevsc_drv_obj *mousevsc_drv_obj = &g_mousevsc_drv;
+	struct hv_driver *drv = &g_mousevsc_drv.Base;
 	int ret;
 
 	struct device *current_dev = NULL;
@@ -1008,8 +1001,8 @@ static int mouse_vsc_initialize(struct hv_driver *Driver)
 
 static int __init mousevsc_init(void)
 {
-	struct mousevsc_drv_obj *input_drv_obj = &g_mousevsc_drv.drv_obj;
-	struct hv_driver *drv = &g_mousevsc_drv.drv_obj.Base;
+	struct mousevsc_drv_obj *input_drv_obj = &g_mousevsc_drv;
+	struct hv_driver *drv = &g_mousevsc_drv.Base;
 
 	DPRINT_INFO(INPUTVSC_DRV, "Hyper-V Mouse driver initializing.");
 
-- 
1.5.5.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [PATCH 09/16] Staging: hv: Eliminate mousevsc_driver_context
@ 2011-03-07 22:16 K. Y. Srinivasan
  0 siblings, 0 replies; 2+ messages in thread
From: K. Y. Srinivasan @ 2011-03-07 22:16 UTC (permalink / raw)
  To: kys, gregkh, linux-kernel, devel, virtualization
  Cc: Abhishek Kane, Haiyang Zhang, Hank Janssen

With the consolidation of all driver state into one data structure;
mousevsc_driver_context structure is not needed; get rid of it.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
---
 drivers/staging/hv/hv_mouse.c |   21 +++++++--------------
 1 files changed, 7 insertions(+), 14 deletions(-)

diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c
index f762a8a..6c5c00d 100644
--- a/drivers/staging/hv/hv_mouse.c
+++ b/drivers/staging/hv/hv_mouse.c
@@ -777,11 +777,8 @@ struct input_device_context {
 	int			connected;
 };
 
-struct mousevsc_driver_context {
-	struct mousevsc_drv_obj	drv_obj;
-};
 
-static struct mousevsc_driver_context g_mousevsc_drv;
+static struct  mousevsc_drv_obj g_mousevsc_drv;
 
 static void deviceinfo_callback(struct hv_device *dev, struct hv_input_dev_info *info)
 {
@@ -824,9 +821,7 @@ static int mousevsc_probe(struct device *device)
 
 	struct hv_driver *drv =
 		drv_to_hv_drv(device->driver);
-	struct mousevsc_driver_context *mousevsc_drv_ctx =
-		(struct mousevsc_driver_context *)drv->priv;
-	struct mousevsc_drv_obj *mousevsc_drv_obj = &mousevsc_drv_ctx->drv_obj;
+	struct mousevsc_drv_obj *mousevsc_drv_obj = drv->priv;
 
 	struct vm_device *device_ctx = device_to_vm_device(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
@@ -855,9 +850,7 @@ static int mousevsc_remove(struct device *device)
 
 	struct hv_driver *drv =
 		drv_to_hv_drv(device->driver);
-	struct mousevsc_driver_context *mousevsc_drv_ctx =
-		(struct mousevsc_driver_context *)drv->priv;
-	struct mousevsc_drv_obj *mousevsc_drv_obj = &mousevsc_drv_ctx->drv_obj;
+	struct mousevsc_drv_obj *mousevsc_drv_obj = drv->priv;
 
 	struct vm_device *device_ctx = device_to_vm_device(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
@@ -956,8 +949,8 @@ static int mousevsc_drv_exit_cb(struct device *dev, void *data)
 
 static void mousevsc_drv_exit(void)
 {
-	struct mousevsc_drv_obj *mousevsc_drv_obj = &g_mousevsc_drv.drv_obj;
-	struct hv_driver *drv = &g_mousevsc_drv.drv_obj.Base;
+	struct mousevsc_drv_obj *mousevsc_drv_obj = &g_mousevsc_drv;
+	struct hv_driver *drv = &g_mousevsc_drv.Base;
 	int ret;
 
 	struct device *current_dev = NULL;
@@ -1008,8 +1001,8 @@ static int mouse_vsc_initialize(struct hv_driver *Driver)
 
 static int __init mousevsc_init(void)
 {
-	struct mousevsc_drv_obj *input_drv_obj = &g_mousevsc_drv.drv_obj;
-	struct hv_driver *drv = &g_mousevsc_drv.drv_obj.Base;
+	struct mousevsc_drv_obj *input_drv_obj = &g_mousevsc_drv;
+	struct hv_driver *drv = &g_mousevsc_drv.Base;
 
 	DPRINT_INFO(INPUTVSC_DRV, "Hyper-V Mouse driver initializing.");
 
-- 
1.5.5.6


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-03-07 22:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-07 21:33 [PATCH 09/16] Staging: hv: Eliminate mousevsc_driver_context K. Y. Srinivasan
  -- strict thread matches above, loose matches on Subject: below --
2011-03-07 22:16 K. Y. Srinivasan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox