Use the newly introduced shutdown() function.
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>
}
-static void blkvsc_shutdown(struct device *device)
+static void blkvsc_shutdown(struct hv_device *dev)
{
- struct block_device_context *blkdev = dev_get_drvdata(device);
+ struct block_device_context *blkdev = dev_get_drvdata(&dev->device);
unsigned long flags;
if (!blkdev)
drv->probe = blkvsc_probe;
drv->remove = blkvsc_remove;
- drv->driver.shutdown = blkvsc_shutdown;
+ drv->shutdown = blkvsc_shutdown;
/* The driver belongs to vmbus */
ret = vmbus_child_driver_register(&drv->driver);
static void vmbus_shutdown(struct device *child_device)
{
struct hv_driver *drv;
+ struct hv_device *dev = device_to_hv_device(child_device);
/* The device may not be attached yet */
drv = drv_to_hv_drv(child_device->driver);
- /* Let the specific open-source driver handles the removal if it can */
- if (drv->driver.shutdown)
- drv->driver.shutdown(child_device);
+ if (drv->shutdown)
+ drv->shutdown(dev);
return;
}