From fde0ef9b235d8cb141e3aa35fdc7e9889e3a4cb3 Mon Sep 17 00:00:00 2001 From: "K. Y. Srinivasan" Date: Thu, 12 May 2011 19:35:08 -0700 Subject: [PATCH] Staging: hv: netvsc_drv: Make netvsc_drv an instance of struct hv_driver In preparation to getting rid of struct netvsc_driver, make the variable netvsc_drv an instance of struct hv_driver. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Abhishek Kane Signed-off-by: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- drivers/staging/hv/netvsc_drv.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 950a45694b2e..d3b614899651 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -428,26 +428,25 @@ static int netvsc_remove(struct hv_device *dev) } /* The one and only one */ -static struct netvsc_driver netvsc_drv = { - .base.probe = netvsc_probe, - .base.remove = netvsc_remove, +static struct hv_driver netvsc_drv = { + .probe = netvsc_probe, + .remove = netvsc_remove, }; static void netvsc_drv_exit(void) { - vmbus_child_driver_unregister(&netvsc_drv.base.driver); + vmbus_child_driver_unregister(&netvsc_drv.driver); } static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) { - struct netvsc_driver *net_drv_obj = &netvsc_drv; - struct hv_driver *drv = &netvsc_drv.base; + struct hv_driver *drv = &netvsc_drv; int ret; /* Callback to client driver to complete the initialization */ - drv_init(&net_drv_obj->base); + drv_init(drv); - drv->driver.name = net_drv_obj->base.name; + drv->driver.name = drv->name; /* The driver belongs to vmbus */ ret = vmbus_child_driver_register(&drv->driver); -- 2.34.1