Commit 9f0c7d2c authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

Staging: hv: fix typedefs in StorVscApi.h

It's all clean now.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 9bcd786a
...@@ -48,7 +48,7 @@ BlkVscInitialize( ...@@ -48,7 +48,7 @@ BlkVscInitialize(
struct hv_driver *Driver struct hv_driver *Driver
) )
{ {
STORVSC_DRIVER_OBJECT* storDriver = (STORVSC_DRIVER_OBJECT*)Driver; struct storvsc_driver_object *storDriver = (struct storvsc_driver_object *)Driver;
int ret=0; int ret=0;
DPRINT_ENTER(BLKVSC); DPRINT_ENTER(BLKVSC);
...@@ -86,7 +86,7 @@ BlkVscOnDeviceAdd( ...@@ -86,7 +86,7 @@ BlkVscOnDeviceAdd(
) )
{ {
int ret=0; int ret=0;
STORVSC_DEVICE_INFO *deviceInfo = (STORVSC_DEVICE_INFO*)AdditionalInfo; struct storvsc_device_info *deviceInfo = (struct storvsc_device_info *)AdditionalInfo;
DPRINT_ENTER(BLKVSC); DPRINT_ENTER(BLKVSC);
......
...@@ -261,7 +261,7 @@ StorVscInitialize( ...@@ -261,7 +261,7 @@ StorVscInitialize(
struct hv_driver *Driver struct hv_driver *Driver
) )
{ {
STORVSC_DRIVER_OBJECT* storDriver = (STORVSC_DRIVER_OBJECT*)Driver; struct storvsc_driver_object *storDriver = (struct storvsc_driver_object *)Driver;
int ret=0; int ret=0;
DPRINT_ENTER(STORVSC); DPRINT_ENTER(STORVSC);
...@@ -319,7 +319,7 @@ StorVscOnDeviceAdd( ...@@ -319,7 +319,7 @@ StorVscOnDeviceAdd(
int ret=0; int ret=0;
STORVSC_DEVICE *storDevice; STORVSC_DEVICE *storDevice;
/* struct vmstorage_channel_properties *props; */ /* struct vmstorage_channel_properties *props; */
STORVSC_DEVICE_INFO *deviceInfo = (STORVSC_DEVICE_INFO*)AdditionalInfo; struct storvsc_device_info *deviceInfo = (struct storvsc_device_info *)AdditionalInfo;
DPRINT_ENTER(STORVSC); DPRINT_ENTER(STORVSC);
...@@ -530,7 +530,7 @@ StorVscConnectToVsp( ...@@ -530,7 +530,7 @@ StorVscConnectToVsp(
int ret=0; int ret=0;
struct vmstorage_channel_properties props; struct 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(struct vmstorage_channel_properties), 0); memset(&props, sizeof(struct vmstorage_channel_properties), 0);
...@@ -615,11 +615,11 @@ void *Context ...@@ -615,11 +615,11 @@ void *Context
) )
{ {
struct hv_device *device=(struct hv_device *)Context; struct hv_device *device=(struct hv_device *)Context;
STORVSC_DRIVER_OBJECT *storDriver; struct storvsc_driver_object *storDriver;
DPRINT_ENTER(STORVSC); DPRINT_ENTER(STORVSC);
storDriver = (STORVSC_DRIVER_OBJECT*) device->Driver; storDriver = (struct storvsc_driver_object*) device->Driver;
storDriver->OnHostRescan(device); storDriver->OnHostRescan(device);
DPRINT_EXIT(STORVSC); DPRINT_EXIT(STORVSC);
......
...@@ -117,7 +117,7 @@ struct block_device_context { ...@@ -117,7 +117,7 @@ struct block_device_context {
struct blkvsc_driver_context { struct blkvsc_driver_context {
/* !! These must be the first 2 fields !! */ /* !! These must be the first 2 fields !! */
struct driver_context drv_ctx; struct driver_context drv_ctx;
STORVSC_DRIVER_OBJECT drv_obj; struct storvsc_driver_object drv_obj;
}; };
/* Static decl */ /* Static decl */
...@@ -173,7 +173,7 @@ Desc: BlkVsc driver initialization. ...@@ -173,7 +173,7 @@ Desc: BlkVsc driver initialization.
static int blkvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init) static int blkvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
{ {
int ret=0; 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; struct driver_context *drv_ctx=&g_blkvsc_drv.drv_ctx;
DPRINT_ENTER(BLKVSC_DRV); DPRINT_ENTER(BLKVSC_DRV);
...@@ -217,7 +217,7 @@ Desc: ...@@ -217,7 +217,7 @@ Desc:
--*/ --*/
static void blkvsc_drv_exit(void) static 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 driver_context *drv_ctx=&g_blkvsc_drv.drv_ctx;
struct device *current_dev=NULL; struct device *current_dev=NULL;
int ret; int ret;
...@@ -268,13 +268,13 @@ static int blkvsc_probe(struct device *device) ...@@ -268,13 +268,13 @@ static int blkvsc_probe(struct device *device)
struct driver_context *driver_ctx = driver_to_driver_context(device->driver); struct driver_context *driver_ctx = driver_to_driver_context(device->driver);
struct blkvsc_driver_context *blkvsc_drv_ctx = (struct blkvsc_driver_context*)driver_ctx; 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 device_context *device_ctx = device_to_device_context(device);
struct hv_device *device_obj = &device_ctx->device_obj; struct hv_device *device_obj = &device_ctx->device_obj;
struct block_device_context *blkdev=NULL; struct block_device_context *blkdev=NULL;
STORVSC_DEVICE_INFO device_info; struct storvsc_device_info device_info;
int major=0; int major=0;
int devnum=0; int devnum=0;
...@@ -777,7 +777,7 @@ static int blkvsc_remove(struct device *device) ...@@ -777,7 +777,7 @@ static int blkvsc_remove(struct device *device)
struct driver_context *driver_ctx = driver_to_driver_context(device->driver); struct driver_context *driver_ctx = driver_to_driver_context(device->driver);
struct blkvsc_driver_context *blkvsc_drv_ctx = (struct blkvsc_driver_context*)driver_ctx; 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 device_context *device_ctx = device_to_device_context(device);
struct hv_device *device_obj = &device_ctx->device_obj; struct hv_device *device_obj = &device_ctx->device_obj;
...@@ -907,7 +907,7 @@ static int blkvsc_submit_request(struct blkvsc_request *blkvsc_req, void (*reque ...@@ -907,7 +907,7 @@ static int blkvsc_submit_request(struct blkvsc_request *blkvsc_req, void (*reque
struct device_context *device_ctx=blkdev->device_ctx; struct device_context *device_ctx=blkdev->device_ctx;
struct driver_context *driver_ctx = driver_to_driver_context(device_ctx->device.driver); struct driver_context *driver_ctx = driver_to_driver_context(device_ctx->device.driver);
struct blkvsc_driver_context *blkvsc_drv_ctx = (struct blkvsc_driver_context*)driver_ctx; 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; int ret =0;
struct hv_storvsc_request *storvsc_req; struct hv_storvsc_request *storvsc_req;
......
...@@ -54,14 +54,14 @@ typedef int (*PFN_ON_HOST_RESET)(struct hv_device *Device); ...@@ -54,14 +54,14 @@ typedef int (*PFN_ON_HOST_RESET)(struct hv_device *Device);
typedef void (*PFN_ON_HOST_RESCAN)(struct hv_device *Device); typedef void (*PFN_ON_HOST_RESCAN)(struct hv_device *Device);
/* Matches Windows-end */ /* Matches Windows-end */
typedef enum _STORVSC_REQUEST_TYPE{ enum storvsc_request_type{
WRITE_TYPE, WRITE_TYPE,
READ_TYPE, READ_TYPE,
UNKNOWN_TYPE, UNKNOWN_TYPE,
} STORVSC_REQUEST_TYPE; };
struct hv_storvsc_request { struct hv_storvsc_request {
STORVSC_REQUEST_TYPE Type; enum storvsc_request_type Type;
u32 Host; u32 Host;
u32 Bus; u32 Bus;
u32 TargetId; u32 TargetId;
...@@ -85,7 +85,7 @@ struct hv_storvsc_request { ...@@ -85,7 +85,7 @@ struct hv_storvsc_request {
}; };
/* Represents the block vsc driver */ /* Represents the block vsc driver */
typedef struct _STORVSC_DRIVER_OBJECT { struct storvsc_driver_object {
/* Must be the first field */ /* Must be the first field */
/* Which is a bug FIXME! */ /* Which is a bug FIXME! */
struct hv_driver Base; struct hv_driver Base;
...@@ -105,13 +105,13 @@ typedef struct _STORVSC_DRIVER_OBJECT { ...@@ -105,13 +105,13 @@ typedef struct _STORVSC_DRIVER_OBJECT {
/* Specific to this driver */ /* Specific to this driver */
PFN_ON_IO_REQUEST OnIORequest; PFN_ON_IO_REQUEST OnIORequest;
PFN_ON_HOST_RESET OnHostReset; PFN_ON_HOST_RESET OnHostReset;
} STORVSC_DRIVER_OBJECT; };
typedef struct _STORVSC_DEVICE_INFO { struct storvsc_device_info {
unsigned int PortNumber; unsigned int PortNumber;
unsigned char PathId; unsigned char PathId;
unsigned char TargetId; unsigned char TargetId;
} STORVSC_DEVICE_INFO; };
/* Interface */ /* Interface */
int StorVscInitialize(struct hv_driver *driver); int StorVscInitialize(struct hv_driver *driver);
......
...@@ -72,7 +72,7 @@ struct storvsc_cmd_request { ...@@ -72,7 +72,7 @@ struct storvsc_cmd_request {
struct storvsc_driver_context { struct storvsc_driver_context {
/* !! These must be the first 2 fields !! */ /* !! These must be the first 2 fields !! */
struct driver_context drv_ctx; struct driver_context drv_ctx;
STORVSC_DRIVER_OBJECT drv_obj; struct storvsc_driver_object drv_obj;
}; };
/* Static decl */ /* Static decl */
...@@ -133,7 +133,7 @@ Desc: StorVsc driver initialization. ...@@ -133,7 +133,7 @@ Desc: StorVsc driver initialization.
static int storvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init) static int storvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
{ {
int ret=0; 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; struct driver_context *drv_ctx=&g_storvsc_drv.drv_ctx;
DPRINT_ENTER(STORVSC_DRV); DPRINT_ENTER(STORVSC_DRV);
...@@ -186,7 +186,7 @@ Desc: ...@@ -186,7 +186,7 @@ Desc:
--*/ --*/
static void storvsc_drv_exit(void) static 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 driver_context *drv_ctx=&g_storvsc_drv.drv_ctx;
struct device *current_dev=NULL; struct device *current_dev=NULL;
int ret; int ret;
...@@ -236,14 +236,14 @@ static int storvsc_probe(struct device *device) ...@@ -236,14 +236,14 @@ static int storvsc_probe(struct device *device)
struct driver_context *driver_ctx = driver_to_driver_context(device->driver); struct driver_context *driver_ctx = driver_to_driver_context(device->driver);
struct storvsc_driver_context *storvsc_drv_ctx = (struct storvsc_driver_context*)driver_ctx; 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 device_context *device_ctx = device_to_device_context(device);
struct hv_device *device_obj = &device_ctx->device_obj; struct hv_device *device_obj = &device_ctx->device_obj;
struct Scsi_Host *host; struct Scsi_Host *host;
struct host_device_context *host_device_ctx; struct host_device_context *host_device_ctx;
STORVSC_DEVICE_INFO device_info; struct storvsc_device_info device_info;
DPRINT_ENTER(STORVSC_DRV); DPRINT_ENTER(STORVSC_DRV);
...@@ -339,7 +339,7 @@ static int storvsc_remove(struct device *device) ...@@ -339,7 +339,7 @@ static int storvsc_remove(struct device *device)
struct driver_context *driver_ctx = driver_to_driver_context(device->driver); struct driver_context *driver_ctx = driver_to_driver_context(device->driver);
struct storvsc_driver_context *storvsc_drv_ctx = (struct storvsc_driver_context*)driver_ctx; 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 device_context *device_ctx = device_to_device_context(device);
struct hv_device *device_obj = &device_ctx->device_obj; struct hv_device *device_obj = &device_ctx->device_obj;
...@@ -665,7 +665,7 @@ static int storvsc_queuecommand(struct scsi_cmnd *scmnd, void (*done)(struct scs ...@@ -665,7 +665,7 @@ static int storvsc_queuecommand(struct scsi_cmnd *scmnd, void (*done)(struct scs
struct device_context *device_ctx=host_device_ctx->device_ctx; struct device_context *device_ctx=host_device_ctx->device_ctx;
struct driver_context *driver_ctx = driver_to_driver_context(device_ctx->device.driver); struct driver_context *driver_ctx = driver_to_driver_context(device_ctx->device.driver);
struct storvsc_driver_context *storvsc_drv_ctx = (struct storvsc_driver_context*)driver_ctx; 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 hv_storvsc_request *request; struct hv_storvsc_request *request;
struct storvsc_cmd_request *cmd_request; struct storvsc_cmd_request *cmd_request;
...@@ -887,7 +887,7 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) ...@@ -887,7 +887,7 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
struct driver_context *driver_ctx = driver_to_driver_context(device_ctx->device.driver); struct driver_context *driver_ctx = driver_to_driver_context(device_ctx->device.driver);
struct storvsc_driver_context *storvsc_drv_ctx = (struct storvsc_driver_context*)driver_ctx; 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); DPRINT_ENTER(STORVSC_DRV);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment