diff options
author | Nicolas Palix | 2009-07-28 17:32:53 +0200 |
---|---|---|
committer | Greg Kroah-Hartman | 2009-09-15 21:01:51 +0200 |
commit | 3d3b5518a35fa3c31b74224d944cbc83302c5ab4 (patch) | |
tree | b58f07d29492df39332ad60c4a3dff055dbf5609 /drivers/staging/hv/storvsc_drv.c | |
parent | Staging: hv: Remove WORKQUEUE typedef (diff) | |
download | kernel-qcow2-linux-3d3b5518a35fa3c31b74224d944cbc83302c5ab4.tar.gz kernel-qcow2-linux-3d3b5518a35fa3c31b74224d944cbc83302c5ab4.tar.xz kernel-qcow2-linux-3d3b5518a35fa3c31b74224d944cbc83302c5ab4.zip |
Staging: hv: Transform PDEVICE_OBJECT and DEVICE_OBJECT typedefs into their corresponding structs
Remove typedef DEVICE_OBJECT and use a struct named hv_device instead.
Remove typedef PDEVICE_OBJECT which aliases a pointer and use
struct hv_device * instead.
Here is the semantic patch to perform this transformation:
(http://coccinelle.lip6.fr/)
//<smpl>
@rm_PDEVICE_OBJECT@
@@
-typedef struct _DEVICE_OBJECT *PDEVICE_OBJECT;
@rm_DEVICE_OBJECT@
@@
-typedef struct _DEVICE_OBJECT
+struct hv_device
{...}
-DEVICE_OBJECT
;
@fixtypedef_PDEVICE_OBJECT@
typedef PDEVICE_OBJECT;
@@
-PDEVICE_OBJECT
+struct hv_device*
@fixtypedef_DEVICE_OBJECT@
typedef DEVICE_OBJECT;
@@
-DEVICE_OBJECT
+struct hv_device
@fixstruct__DEVICE_OBJECT@
@@
struct
-_DEVICE_OBJECT
+hv_device
//</smpl>
Signed-off-by: Nicolas Palix <npalix@diku.dk>
Cc: 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.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index cbea8a2f0541..385e84bd52cc 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -82,7 +82,7 @@ static int storvsc_device_alloc(struct scsi_device *); static int storvsc_device_configure(struct scsi_device *); static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd); static void storvsc_host_rescan_callback(struct work_struct *work); -static void storvsc_host_rescan(DEVICE_OBJECT* device_obj); +static void storvsc_host_rescan(struct hv_device* device_obj); static int storvsc_remove(struct device *dev); static struct scatterlist *create_bounce_buffer(struct scatterlist *sgl, unsigned int sg_count, unsigned int len); @@ -233,7 +233,7 @@ static int storvsc_probe(struct device *device) STORVSC_DRIVER_OBJECT* storvsc_drv_obj = &storvsc_drv_ctx->drv_obj; struct device_context *device_ctx = device_to_device_context(device); - DEVICE_OBJECT* device_obj = &device_ctx->device_obj; + struct hv_device *device_obj = &device_ctx->device_obj; struct Scsi_Host *host; struct host_device_context *host_device_ctx; @@ -336,7 +336,7 @@ static int storvsc_remove(struct device *device) STORVSC_DRIVER_OBJECT* storvsc_drv_obj = &storvsc_drv_ctx->drv_obj; struct device_context *device_ctx = device_to_device_context(device); - DEVICE_OBJECT* device_obj = &device_ctx->device_obj; + struct hv_device *device_obj = &device_ctx->device_obj; struct Scsi_Host *host = dev_get_drvdata(device); struct host_device_context *host_device_ctx=(struct host_device_context*)host->hostdata; @@ -912,7 +912,7 @@ Desc: Rescan the scsi HBA --*/ static void storvsc_host_rescan_callback(struct work_struct *work) { - DEVICE_OBJECT* device_obj = + struct hv_device *device_obj = &((struct host_device_context*)work)->device_ctx->device_obj; struct device_context* device_ctx = to_device_context(device_obj); struct Scsi_Host *host = dev_get_drvdata(&device_ctx->device); @@ -1076,7 +1076,7 @@ static int storvsc_report_luns(struct scsi_device *sdev, unsigned int luns[], un return 0; } -static void storvsc_host_rescan(DEVICE_OBJECT* device_obj) +static void storvsc_host_rescan(struct hv_device *device_obj) { struct device_context* device_ctx = to_device_context(device_obj); struct Scsi_Host *host = dev_get_drvdata(&device_ctx->device); |