Skip to content

Commit

Permalink
Staging: hv: Use the shutdown() function in struct hv_driver
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
K. Y. Srinivasan authored and Greg Kroah-Hartman committed May 3, 2011
1 parent b858e74 commit ca6887f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions drivers/staging/hv/blkvsc_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -585,9 +585,9 @@ static int blkvsc_remove(struct hv_device *dev)

}

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)
Expand Down Expand Up @@ -883,7 +883,7 @@ static int blkvsc_drv_init(void)

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);
Expand Down
6 changes: 3 additions & 3 deletions drivers/staging/hv/vmbus_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +367,7 @@ static int vmbus_remove(struct device *child_device)
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 */
Expand All @@ -375,9 +376,8 @@ static void vmbus_shutdown(struct device *child_device)

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;
}
Expand Down

0 comments on commit ca6887f

Please sign in to comment.