diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2011-05-12 19:34:45 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-05-17 12:27:10 -0700 |
commit | 2bda87cb6c765bf2178d3da90367bf53dbcc14d6 (patch) | |
tree | b25459ed2850752813b325e88d6281b1f6993517 /drivers/staging/hv/storvsc_drv.c | |
parent | 8553d753a494dfd952d7e44ab6f1171839b6185d (diff) | |
download | kernel_samsung_smdk4412-2bda87cb6c765bf2178d3da90367bf53dbcc14d6.zip kernel_samsung_smdk4412-2bda87cb6c765bf2178d3da90367bf53dbcc14d6.tar.gz kernel_samsung_smdk4412-2bda87cb6c765bf2178d3da90367bf53dbcc14d6.tar.bz2 |
Staging: hv: storvsc_drv: Cleanup storvsc_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 storvsc_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>
Diffstat (limited to 'drivers/staging/hv/storvsc_drv.c')
-rw-r--r-- | drivers/staging/hv/storvsc_drv.c | 30 |
1 files changed, 1 insertions, 29 deletions
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index d811385..942cc5f 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -792,37 +792,9 @@ static int storvsc_drv_init(void) return ret; } -static int storvsc_drv_exit_cb(struct device *dev, void *data) -{ - struct device **curr = (struct device **)data; - *curr = dev; - return 1; /* stop iterating */ -} - static void storvsc_drv_exit(void) { - struct hv_driver *drv = &storvsc_drv; - struct device *current_dev = NULL; - int ret; - - while (1) { - current_dev = NULL; - - /* Get the device */ - ret = driver_for_each_device(&drv->driver, NULL, - (void *) ¤t_dev, - storvsc_drv_exit_cb); - - - 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(&storvsc_drv.driver); } static int __init storvsc_init(void) |