Commit 94851c34 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: Use generic device_driver remove function

In preparation for moving all the state from struct driver_context
to struct hv_driver, eliminate the remove() function from
struct driver_context and use generic device_driver remove()
function.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarAbhishek Kane <v-abkane@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 904777c7
...@@ -187,7 +187,7 @@ static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) ...@@ -187,7 +187,7 @@ static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
sizeof(struct hv_guid)); sizeof(struct hv_guid));
drv_ctx->driver.probe = blkvsc_probe; drv_ctx->driver.probe = blkvsc_probe;
drv_ctx->remove = blkvsc_remove; drv_ctx->driver.remove = blkvsc_remove;
drv_ctx->shutdown = blkvsc_shutdown; drv_ctx->shutdown = blkvsc_shutdown;
/* The driver belongs to vmbus */ /* The driver belongs to vmbus */
......
...@@ -1022,7 +1022,7 @@ static int __init mousevsc_init(void) ...@@ -1022,7 +1022,7 @@ static int __init mousevsc_init(void)
sizeof(struct hv_guid)); sizeof(struct hv_guid));
drv_ctx->driver.probe = mousevsc_probe; drv_ctx->driver.probe = mousevsc_probe;
drv_ctx->remove = mousevsc_remove; drv_ctx->driver.remove = mousevsc_remove;
/* The driver belongs to vmbus */ /* The driver belongs to vmbus */
vmbus_child_driver_register(drv_ctx); vmbus_child_driver_register(drv_ctx);
......
...@@ -512,7 +512,7 @@ static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) ...@@ -512,7 +512,7 @@ static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
sizeof(struct hv_guid)); sizeof(struct hv_guid));
drv_ctx->driver.probe = netvsc_probe; drv_ctx->driver.probe = netvsc_probe;
drv_ctx->remove = netvsc_remove; drv_ctx->driver.remove = netvsc_remove;
/* The driver belongs to vmbus */ /* The driver belongs to vmbus */
ret = vmbus_child_driver_register(drv_ctx); ret = vmbus_child_driver_register(drv_ctx);
......
...@@ -165,7 +165,7 @@ static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) ...@@ -165,7 +165,7 @@ static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
sizeof(struct hv_guid)); sizeof(struct hv_guid));
drv_ctx->driver.probe = storvsc_probe; drv_ctx->driver.probe = storvsc_probe;
drv_ctx->remove = storvsc_remove; drv_ctx->driver.remove = storvsc_remove;
/* The driver belongs to vmbus */ /* The driver belongs to vmbus */
ret = vmbus_child_driver_register(drv_ctx); ret = vmbus_child_driver_register(drv_ctx);
......
...@@ -964,8 +964,8 @@ static int vmbus_remove(struct device *child_device) ...@@ -964,8 +964,8 @@ static int vmbus_remove(struct device *child_device)
* Let the specific open-source driver handles the removal if * Let the specific open-source driver handles the removal if
* it can * it can
*/ */
if (driver_ctx->remove) { if (driver_ctx->driver.remove) {
ret = driver_ctx->remove(child_device); ret = driver_ctx->driver.remove(child_device);
} else { } else {
DPRINT_ERR(VMBUS_DRV, DPRINT_ERR(VMBUS_DRV,
"remove() method not set for driver - %s", "remove() method not set for driver - %s",
......
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