[PATCH 140/206] Staging: hv: storvsc_drv: Inline the copying of the dev_type information

K. Y. Srinivasan kys at microsoft.com
Tue May 10 14:56:06 UTC 2011


In preperation to eliminate the function storvsc_initialize()
move the copying of dev_type info.

Signed-off-by: K. Y. Srinivasan <kys at microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz at microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane at microsoft.com>
Signed-off-by: Hank Janssen <hjanssen at microsoft.com>
---
 drivers/staging/hv/storvsc_drv.c |    9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 9447130..3be4f1a 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -83,12 +83,6 @@ static int storvsc_initialize(struct hv_driver *driver)
 
 	stor_driver = hvdr_to_stordr(driver);
 
-
-	/* Make sure we are at least 2 pages since 1 page is used for control */
-
-	memcpy(&driver->dev_type, &gStorVscDeviceType,
-	       sizeof(struct hv_guid));
-
 	return 0;
 }
 
@@ -801,6 +795,9 @@ static int storvsc_drv_init(void)
 	/* Callback to client driver to complete the initialization */
 	storvsc_initialize(&storvsc_drv_obj->base);
 
+	memcpy(&drv->dev_type, &gStorVscDeviceType,
+	       sizeof(struct hv_guid));
+
 	if (max_outstanding_req_per_channel <
 	    STORVSC_MAX_IO_REQUESTS)
 		return -1;
-- 
1.7.4.1




More information about the devel mailing list