Skip to content

Commit

Permalink
Staging: hv: netvsc_drv: Make netvsc_drv an instance of struct hv_driver
Browse files Browse the repository at this point in the history
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 <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed May 17, 2011
1 parent 4e3cba6 commit fde0ef9
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions drivers/staging/hv/netvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit fde0ef9

Please sign in to comment.