[PATCH 12/13] staging/hv: use struct storvsc_driver_object

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Signed-off-by: Joe Perches <joe at perches.com>
---
 drivers/staging/hv/BlkVsc.c             |    2 +-
 drivers/staging/hv/StorVsc.c            |   11 ++++++-----
 drivers/staging/hv/blkvsc_drv.c         |   12 ++++++------
 drivers/staging/hv/include/StorVscApi.h |    4 ++--
 drivers/staging/hv/storvsc_drv.c        |   14 +++++++-------
 5 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c
index 29217a5..829699c 100644
--- a/drivers/staging/hv/BlkVsc.c
+++ b/drivers/staging/hv/BlkVsc.c
@@ -38,7 +38,7 @@ static int BlkVscOnDeviceAdd(struct hv_device *Device, void *AdditionalInfo);
 
 int BlkVscInitialize(struct driver_object *Driver)
 {
-	STORVSC_DRIVER_OBJECT *storDriver = (STORVSC_DRIVER_OBJECT *) Driver;
+	struct storvsc_driver_object *storDriver = (struct storvsc_driver_object *)Driver;
 	int ret = 0;
 
 	DPRINT_ENTER(BLKVSC);
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c
index 7270c2e..f8c5808 100644
--- a/drivers/staging/hv/StorVsc.c
+++ b/drivers/staging/hv/StorVsc.c
@@ -221,7 +221,8 @@ Description:
 --*/
 int StorVscInitialize(struct driver_object *Driver)
 {
-	STORVSC_DRIVER_OBJECT *storDriver = (STORVSC_DRIVER_OBJECT *) Driver;
+	struct storvsc_driver_object *storDriver =
+		(struct storvsc_driver_object *)Driver;
 	int ret = 0;
 
 	DPRINT_ENTER(STORVSC);
@@ -509,8 +510,8 @@ int StorVscConnectToVsp(struct hv_device *Device)
 	int ret = 0;
 	VMSTORAGE_CHANNEL_PROPERTIES props;
 
-	STORVSC_DRIVER_OBJECT *storDriver =
-	    (STORVSC_DRIVER_OBJECT *) Device->Driver;;
+	struct storvsc_driver_object *storDriver =
+	    (struct storvsc_driver_object *)Device->Driver;
 
 	memset(&props, sizeof(VMSTORAGE_CHANNEL_PROPERTIES), 0);
 
@@ -595,11 +596,11 @@ void *Context
 )
 {
 struct hv_device *device=(struct hv_device *)Context;
-STORVSC_DRIVER_OBJECT *storDriver;
+struct storvsc_driver_object *storDriver;
 
 DPRINT_ENTER(STORVSC);
 
-storDriver = (STORVSC_DRIVER_OBJECT*) device->Driver;
+storDriver = (struct storvsc_driver_object *)device->Driver;
 storDriver->OnHostRescan(device);
 
 DPRINT_EXIT(STORVSC);
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c
index 31498ed..60fd4bb 100644
--- a/drivers/staging/hv/blkvsc_drv.c
+++ b/drivers/staging/hv/blkvsc_drv.c
@@ -113,7 +113,7 @@ struct block_device_context {
 struct blkvsc_driver_context {
 	/* !! These must be the first 2 fields !! */
 	struct driver_context drv_ctx;
-	STORVSC_DRIVER_OBJECT drv_obj;
+	struct storvsc_driver_object drv_obj;
 };
 
 /* Static decl */
@@ -169,7 +169,7 @@ Desc:	BlkVsc driver initialization.
 int blkvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
 {
 	int ret = 0;
-	STORVSC_DRIVER_OBJECT *storvsc_drv_obj = &g_blkvsc_drv.drv_obj;
+	struct storvsc_driver_object *storvsc_drv_obj = &g_blkvsc_drv.drv_obj;
 	struct driver_context *drv_ctx = &g_blkvsc_drv.drv_ctx;
 
 	DPRINT_ENTER(BLKVSC_DRV);
@@ -213,7 +213,7 @@ Desc:
 --*/
 void blkvsc_drv_exit(void)
 {
-	STORVSC_DRIVER_OBJECT *storvsc_drv_obj = &g_blkvsc_drv.drv_obj;
+	struct storvsc_driver_object *storvsc_drv_obj = &g_blkvsc_drv.drv_obj;
 	struct driver_context *drv_ctx = &g_blkvsc_drv.drv_ctx;
 	struct device *current_dev = NULL;
 	int ret;
@@ -264,7 +264,7 @@ static int blkvsc_probe(struct device *device)
 	    driver_to_driver_context(device->driver);
 	struct blkvsc_driver_context *blkvsc_drv_ctx =
 	    (struct blkvsc_driver_context *)driver_ctx;
-	STORVSC_DRIVER_OBJECT *storvsc_drv_obj = &blkvsc_drv_ctx->drv_obj;
+	struct storvsc_driver_object *storvsc_drv_obj = &blkvsc_drv_ctx->drv_obj;
 
 	struct device_context *device_ctx = device_to_device_context(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
@@ -758,7 +758,7 @@ static int blkvsc_remove(struct device *device)
 	    driver_to_driver_context(device->driver);
 	struct blkvsc_driver_context *blkvsc_drv_ctx =
 	    (struct blkvsc_driver_context *)driver_ctx;
-	STORVSC_DRIVER_OBJECT *storvsc_drv_obj = &blkvsc_drv_ctx->drv_obj;
+	struct storvsc_driver_object *storvsc_drv_obj = &blkvsc_drv_ctx->drv_obj;
 
 	struct device_context *device_ctx = device_to_device_context(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
@@ -882,7 +882,7 @@ static int blkvsc_submit_request(struct blkvsc_request *blkvsc_req,
 	    driver_to_driver_context(device_ctx->device.driver);
 	struct blkvsc_driver_context *blkvsc_drv_ctx =
 	    (struct blkvsc_driver_context *)driver_ctx;
-	STORVSC_DRIVER_OBJECT *storvsc_drv_obj = &blkvsc_drv_ctx->drv_obj;
+	struct storvsc_driver_object *storvsc_drv_obj = &blkvsc_drv_ctx->drv_obj;
 	int ret = 0;
 
 	struct storvsc_request *storvsc_req;
diff --git a/drivers/staging/hv/include/StorVscApi.h b/drivers/staging/hv/include/StorVscApi.h
index 61e2bf1..906581f 100644
--- a/drivers/staging/hv/include/StorVscApi.h
+++ b/drivers/staging/hv/include/StorVscApi.h
@@ -89,7 +89,7 @@ struct storvsc_request {
 };
 
 /* Represents the block vsc driver */
-typedef struct _STORVSC_DRIVER_OBJECT {
+ struct storvsc_driver_object {
 	struct driver_object Base;	/* Must be the first field */
 
 	/* Set by caller (in bytes) */
@@ -108,7 +108,7 @@ typedef struct _STORVSC_DRIVER_OBJECT {
 	PFN_ON_IO_REQUEST OnIORequest;
 	PFN_ON_HOST_RESET OnHostReset;
 
-} STORVSC_DRIVER_OBJECT;
+};
 
 typedef struct _STORVSC_DEVICE_INFO {
 	unsigned int PortNumber;
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c
index 678a2b3..b558702 100644
--- a/drivers/staging/hv/storvsc_drv.c
+++ b/drivers/staging/hv/storvsc_drv.c
@@ -69,7 +69,7 @@ struct storvsc_cmd_request {
 struct storvsc_driver_context {
 	/* !! These must be the first 2 fields !! */
 	struct driver_context drv_ctx;
-	STORVSC_DRIVER_OBJECT drv_obj;
+	struct storvsc_driver_object drv_obj;
 };
 
 /* Static decl */
@@ -138,7 +138,7 @@ Desc:	StorVsc driver initialization.
 int storvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
 {
 	int ret = 0;
-	STORVSC_DRIVER_OBJECT *storvsc_drv_obj = &g_storvsc_drv.drv_obj;
+	struct storvsc_driver_object *storvsc_drv_obj = &g_storvsc_drv.drv_obj;
 	struct driver_context *drv_ctx = &g_storvsc_drv.drv_ctx;
 
 	DPRINT_ENTER(STORVSC_DRV);
@@ -196,7 +196,7 @@ Desc:
 --*/
 void storvsc_drv_exit(void)
 {
-	STORVSC_DRIVER_OBJECT *storvsc_drv_obj = &g_storvsc_drv.drv_obj;
+	struct storvsc_driver_object *storvsc_drv_obj = &g_storvsc_drv.drv_obj;
 	struct driver_context *drv_ctx = &g_storvsc_drv.drv_ctx;
 	struct device *current_dev = NULL;
 	int ret;
@@ -247,7 +247,7 @@ static int storvsc_probe(struct device *device)
 	    driver_to_driver_context(device->driver);
 	struct storvsc_driver_context *storvsc_drv_ctx =
 	    (struct storvsc_driver_context *)driver_ctx;
-	STORVSC_DRIVER_OBJECT *storvsc_drv_obj = &storvsc_drv_ctx->drv_obj;
+	struct storvsc_driver_object *storvsc_drv_obj = &storvsc_drv_ctx->drv_obj;
 
 	struct device_context *device_ctx = device_to_device_context(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
@@ -349,7 +349,7 @@ static int storvsc_remove(struct device *device)
 	    driver_to_driver_context(device->driver);
 	struct storvsc_driver_context *storvsc_drv_ctx =
 	    (struct storvsc_driver_context *)driver_ctx;
-	STORVSC_DRIVER_OBJECT *storvsc_drv_obj = &storvsc_drv_ctx->drv_obj;
+	struct storvsc_driver_object *storvsc_drv_obj = &storvsc_drv_ctx->drv_obj;
 
 	struct device_context *device_ctx = device_to_device_context(device);
 	struct hv_device *device_obj = &device_ctx->device_obj;
@@ -680,7 +680,7 @@ static int storvsc_queuecommand(struct scsi_cmnd *scmnd,
 	    driver_to_driver_context(device_ctx->device.driver);
 	struct storvsc_driver_context *storvsc_drv_ctx =
 	    (struct storvsc_driver_context *)driver_ctx;
-	STORVSC_DRIVER_OBJECT *storvsc_drv_obj = &storvsc_drv_ctx->drv_obj;
+	struct storvsc_driver_object *storvsc_drv_obj = &storvsc_drv_ctx->drv_obj;
 
 	struct storvsc_request *request;
 	struct storvsc_cmd_request *cmd_request;
@@ -924,7 +924,7 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
 	struct storvsc_driver_context *storvsc_drv_ctx =
 	    (struct storvsc_driver_context *)driver_ctx;
 
-	STORVSC_DRIVER_OBJECT *storvsc_drv_obj = &storvsc_drv_ctx->drv_obj;
+	struct storvsc_driver_object *storvsc_drv_obj = &storvsc_drv_ctx->drv_obj;
 
 	DPRINT_ENTER(STORVSC_DRV);
 
-- 
1.6.3.1.10.g659a0.dirty



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux