diff options
author | K. Y. Srinivasan | 2011-05-13 04:34:44 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2011-05-17 21:27:09 +0200 |
commit | 8553d753a494dfd952d7e44ab6f1171839b6185d (patch) | |
tree | 8c30281ec62637f850c755196e7cdd4a3ad20c92 | |
parent | Staging: hv: mouse_drv: Fix a sparse warning (diff) | |
download | kernel-qcow2-linux-8553d753a494dfd952d7e44ab6f1171839b6185d.tar.gz kernel-qcow2-linux-8553d753a494dfd952d7e44ab6f1171839b6185d.tar.xz kernel-qcow2-linux-8553d753a494dfd952d7e44ab6f1171839b6185d.zip |
Staging: hv: blkvsc_drv: Cleanup the blkvsc_drv_exit() function
To conform to the Linux device model, the device should persist even
when there is no driver bound to it. Cleanup the blkvsc_drv_exit() routine
keeping this in mind.
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>
-rw-r--r-- | drivers/staging/hv/blkvsc_drv.c | 33 |
1 files changed, 1 insertions, 32 deletions
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index 3c1637f2c27d..46daade7a9e2 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -833,42 +833,11 @@ static int blkvsc_drv_init(void) return ret; } -static int blkvsc_drv_exit_cb(struct device *dev, void *data) -{ - struct device **curr = (struct device **)data; - *curr = dev; - return 1; /* stop iterating */ -} static void blkvsc_drv_exit(void) { - struct hv_driver *drv = &blkvsc_drv; - struct device *current_dev; - int ret; - - while (1) { - current_dev = NULL; - - /* Get the device */ - ret = driver_for_each_device(&drv->driver, NULL, - (void *) ¤t_dev, - blkvsc_drv_exit_cb); - - if (ret) - DPRINT_WARN(BLKVSC_DRV, - "driver_for_each_device returned %d", ret); - - - if (current_dev == NULL) - break; - - /* Initiate removal from the top-down */ - device_unregister(current_dev); - } - - vmbus_child_driver_unregister(&drv->driver); - return; + vmbus_child_driver_unregister(&blkvsc_drv.driver); } /* |