aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/storvsc_drv.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2011-05-10 07:54:33 -0700
committerGreg Kroah-Hartman <gregkh@suse.de>2011-05-11 13:39:15 -0700
commit5c5c023496d61cee6088f59fe5e7e7a8034f6fa9 (patch)
tree97560ed386fd8935ed3ae2b3650d3ffdc3faa56f /drivers/staging/hv/storvsc_drv.c
parent6a8ff44b76edaa63d8781e93e64e8481e35510b0 (diff)
downloadkernel_samsung_smdk4412-5c5c023496d61cee6088f59fe5e7e7a8034f6fa9.zip
kernel_samsung_smdk4412-5c5c023496d61cee6088f59fe5e7e7a8034f6fa9.tar.gz
kernel_samsung_smdk4412-5c5c023496d61cee6088f59fe5e7e7a8034f6fa9.tar.bz2
Staging: hv: Get rid of the forward declaration of storvsc_remove()
Get rid of the forward declaration by moving the code around. 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.c62
1 files changed, 31 insertions, 31 deletions
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 807ba89..6f23f52 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -350,11 +350,41 @@ static unsigned int copy_to_bounce_buffer(struct scatterlist *orig_sgl,
return total_copied;
}
+
+/*
+ * storvsc_remove - Callback when our device is removed
+ */
+static int storvsc_remove(struct hv_device *dev)
+{
+ struct storvsc_driver *storvsc_drv_obj =
+ drv_to_stordrv(dev->device.driver);
+ struct Scsi_Host *host = dev_get_drvdata(&dev->device);
+ struct hv_host_device *host_dev =
+ (struct hv_host_device *)host->hostdata;
+
+ /*
+ * Call to the vsc driver to let it know that the device is being
+ * removed
+ */
+ storvsc_drv_obj->base.dev_rm(dev);
+
+ if (host_dev->request_pool) {
+ kmem_cache_destroy(host_dev->request_pool);
+ host_dev->request_pool = NULL;
+ }
+
+ DPRINT_INFO(STORVSC, "removing host adapter (%p)...", host);
+ scsi_remove_host(host);
+
+ DPRINT_INFO(STORVSC, "releasing host adapter (%p)...", host);
+ scsi_host_put(host);
+ return 0;
+}
+
/* Static decl */
static int storvsc_probe(struct hv_device *dev);
static int storvsc_queuecommand(struct Scsi_Host *shost, struct scsi_cmnd *scmnd);
static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd);
-static int storvsc_remove(struct hv_device *dev);
static int storvsc_get_chs(struct scsi_device *sdev, struct block_device *bdev,
sector_t capacity, int *info);
@@ -589,36 +619,6 @@ static int storvsc_probe(struct hv_device *device)
}
/*
- * storvsc_remove - Callback when our device is removed
- */
-static int storvsc_remove(struct hv_device *dev)
-{
- struct storvsc_driver *storvsc_drv_obj =
- drv_to_stordrv(dev->device.driver);
- struct Scsi_Host *host = dev_get_drvdata(&dev->device);
- struct hv_host_device *host_dev =
- (struct hv_host_device *)host->hostdata;
-
- /*
- * Call to the vsc driver to let it know that the device is being
- * removed
- */
- storvsc_drv_obj->base.dev_rm(dev);
-
- if (host_dev->request_pool) {
- kmem_cache_destroy(host_dev->request_pool);
- host_dev->request_pool = NULL;
- }
-
- DPRINT_INFO(STORVSC, "removing host adapter (%p)...", host);
- scsi_remove_host(host);
-
- DPRINT_INFO(STORVSC, "releasing host adapter (%p)...", host);
- scsi_host_put(host);
- return 0;
-}
-
-/*
* storvsc_commmand_completion - Command completion processing
*/
static void storvsc_commmand_completion(struct hv_storvsc_request *request)