Staging: hv: Transform PDEVICE_OBJECT and DEVICE_OBJECT typedefs into their correspon...
authorNicolas Palix <npalix@diku.dk>
Tue, 28 Jul 2009 15:32:53 +0000 (17:32 +0200)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:01:51 +0000 (12:01 -0700)
commit3d3b5518a35fa3c31b74224d944cbc83302c5ab4
treeb58f07d29492df39332ad60c4a3dff055dbf5609
parentdf8d9b1f6deb468dd6752f0cd1029157c15248fd
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>
18 files changed:
drivers/staging/hv/BlkVsc.c
drivers/staging/hv/ChannelInterface.c
drivers/staging/hv/ChannelInterface.h
drivers/staging/hv/ChannelMgmt.h
drivers/staging/hv/NetVsc.c
drivers/staging/hv/NetVsc.h
drivers/staging/hv/RndisFilter.c
drivers/staging/hv/StorVsc.c
drivers/staging/hv/Vmbus.c
drivers/staging/hv/VmbusPrivate.h
drivers/staging/hv/blkvsc_drv.c
drivers/staging/hv/include/NetVscApi.h
drivers/staging/hv/include/StorVscApi.h
drivers/staging/hv/include/VmbusApi.h
drivers/staging/hv/include/vmbus.h
drivers/staging/hv/netvsc_drv.c
drivers/staging/hv/storvsc_drv.c
drivers/staging/hv/vmbus_drv.c