From: K. Y. Srinivasan Date: Mon, 7 Mar 2011 21:21:47 +0000 (-0800) Subject: Staging: hv: Use generic device_driver remove function X-Git-Tag: firefly_0821_release~7613^2~2197^2~232 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=94851c343d1f98f866760c96a8956e30b07e579c;p=firefly-linux-kernel-4.4.55.git 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: K. Y. Srinivasan Signed-off-by: Abhishek Kane Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index 0dff55791d26..3e86a560074e 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -187,7 +187,7 @@ static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) sizeof(struct hv_guid)); drv_ctx->driver.probe = blkvsc_probe; - drv_ctx->remove = blkvsc_remove; + drv_ctx->driver.remove = blkvsc_remove; drv_ctx->shutdown = blkvsc_shutdown; /* The driver belongs to vmbus */ diff --git a/drivers/staging/hv/hv_mouse.c b/drivers/staging/hv/hv_mouse.c index 4a25f3b8770d..6e2a937df4e3 100644 --- a/drivers/staging/hv/hv_mouse.c +++ b/drivers/staging/hv/hv_mouse.c @@ -1022,7 +1022,7 @@ static int __init mousevsc_init(void) sizeof(struct hv_guid)); drv_ctx->driver.probe = mousevsc_probe; - drv_ctx->remove = mousevsc_remove; + drv_ctx->driver.remove = mousevsc_remove; /* The driver belongs to vmbus */ vmbus_child_driver_register(drv_ctx); diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 083f0d348598..e2013b5e3487 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -512,7 +512,7 @@ static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) sizeof(struct hv_guid)); drv_ctx->driver.probe = netvsc_probe; - drv_ctx->remove = netvsc_remove; + drv_ctx->driver.remove = netvsc_remove; /* The driver belongs to vmbus */ ret = vmbus_child_driver_register(drv_ctx); diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index 3fe4bdb4ec92..3855271bda1e 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -165,7 +165,7 @@ static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) sizeof(struct hv_guid)); drv_ctx->driver.probe = storvsc_probe; - drv_ctx->remove = storvsc_remove; + drv_ctx->driver.remove = storvsc_remove; /* The driver belongs to vmbus */ ret = vmbus_child_driver_register(drv_ctx); diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index fee2a8f9b4e4..4df2be04fd14 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -964,8 +964,8 @@ static int vmbus_remove(struct device *child_device) * Let the specific open-source driver handles the removal if * it can */ - if (driver_ctx->remove) { - ret = driver_ctx->remove(child_device); + if (driver_ctx->driver.remove) { + ret = driver_ctx->driver.remove(child_device); } else { DPRINT_ERR(VMBUS_DRV, "remove() method not set for driver - %s",