From: Greg Kroah-Hartman Date: Fri, 28 Aug 2009 23:20:07 +0000 (-0700) Subject: Staging: hv: fix typedefs in StorVscApi.h X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f0c7d2cc30a0691d478b069b499d6b1d01546a2;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Staging: hv: fix typedefs in StorVscApi.h It's all clean now. Cc: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/BlkVsc.c b/drivers/staging/hv/BlkVsc.c index d613e599ffac..d433d8c444f7 100644 --- a/drivers/staging/hv/BlkVsc.c +++ b/drivers/staging/hv/BlkVsc.c @@ -48,7 +48,7 @@ BlkVscInitialize( 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; DPRINT_ENTER(BLKVSC); @@ -86,7 +86,7 @@ BlkVscOnDeviceAdd( ) { int ret=0; - STORVSC_DEVICE_INFO *deviceInfo = (STORVSC_DEVICE_INFO*)AdditionalInfo; + struct storvsc_device_info *deviceInfo = (struct storvsc_device_info *)AdditionalInfo; DPRINT_ENTER(BLKVSC); diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c index bcc545f037ac..edb3ab6d12d6 100644 --- a/drivers/staging/hv/StorVsc.c +++ b/drivers/staging/hv/StorVsc.c @@ -261,7 +261,7 @@ StorVscInitialize( 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; DPRINT_ENTER(STORVSC); @@ -319,7 +319,7 @@ StorVscOnDeviceAdd( int ret=0; STORVSC_DEVICE *storDevice; /* 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); @@ -530,7 +530,7 @@ StorVscConnectToVsp( int ret=0; 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); @@ -615,11 +615,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 f91fa431b7c5..8dcc140a5dca 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -117,7 +117,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 */ @@ -173,7 +173,7 @@ Desc: BlkVsc driver initialization. static 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); @@ -217,7 +217,7 @@ Desc: --*/ 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 device *current_dev=NULL; int ret; @@ -268,13 +268,13 @@ static int blkvsc_probe(struct device *device) struct driver_context *driver_ctx = 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; struct block_device_context *blkdev=NULL; - STORVSC_DEVICE_INFO device_info; + struct storvsc_device_info device_info; int major=0; int devnum=0; @@ -777,7 +777,7 @@ static int blkvsc_remove(struct device *device) struct driver_context *driver_ctx = 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; @@ -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 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; - 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 hv_storvsc_request *storvsc_req; diff --git a/drivers/staging/hv/include/StorVscApi.h b/drivers/staging/hv/include/StorVscApi.h index 2deefbda73b1..56193ff663e6 100644 --- a/drivers/staging/hv/include/StorVscApi.h +++ b/drivers/staging/hv/include/StorVscApi.h @@ -54,14 +54,14 @@ typedef int (*PFN_ON_HOST_RESET)(struct hv_device *Device); typedef void (*PFN_ON_HOST_RESCAN)(struct hv_device *Device); /* Matches Windows-end */ -typedef enum _STORVSC_REQUEST_TYPE{ +enum storvsc_request_type{ WRITE_TYPE, READ_TYPE, UNKNOWN_TYPE, -} STORVSC_REQUEST_TYPE; +}; struct hv_storvsc_request { - STORVSC_REQUEST_TYPE Type; + enum storvsc_request_type Type; u32 Host; u32 Bus; u32 TargetId; @@ -85,7 +85,7 @@ struct hv_storvsc_request { }; /* Represents the block vsc driver */ -typedef struct _STORVSC_DRIVER_OBJECT { +struct storvsc_driver_object { /* Must be the first field */ /* Which is a bug FIXME! */ struct hv_driver Base; @@ -105,13 +105,13 @@ typedef struct _STORVSC_DRIVER_OBJECT { /* Specific to this driver */ PFN_ON_IO_REQUEST OnIORequest; PFN_ON_HOST_RESET OnHostReset; -} STORVSC_DRIVER_OBJECT; +}; -typedef struct _STORVSC_DEVICE_INFO { +struct storvsc_device_info { unsigned int PortNumber; unsigned char PathId; unsigned char TargetId; -} STORVSC_DEVICE_INFO; +}; /* Interface */ int StorVscInitialize(struct hv_driver *driver); diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index a3d591dac046..155ba1df4b33 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -72,7 +72,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 */ @@ -133,7 +133,7 @@ Desc: StorVsc driver initialization. static 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); @@ -186,7 +186,7 @@ Desc: --*/ 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 device *current_dev=NULL; int ret; @@ -236,14 +236,14 @@ static int storvsc_probe(struct device *device) struct driver_context *driver_ctx = 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; struct Scsi_Host *host; struct host_device_context *host_device_ctx; - STORVSC_DEVICE_INFO device_info; + struct storvsc_device_info device_info; DPRINT_ENTER(STORVSC_DRV); @@ -339,7 +339,7 @@ static int storvsc_remove(struct device *device) struct driver_context *driver_ctx = 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; @@ -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 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; - 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 storvsc_cmd_request *cmd_request; @@ -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 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);