Staging: hv: typedef removal for VmbusApi.h
authorGreg Kroah-Hartman <gregkh@suse.de>
Thu, 20 Aug 2009 19:17:36 +0000 (12:17 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 15 Sep 2009 19:01:58 +0000 (12:01 -0700)
The function pointers still have ugly names, but the structures
are now cleaned up.

Note, a comment was added where the driver structure is pointing
at a problem that needs to be fixed up later in the code.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
13 files changed:
drivers/staging/hv/Channel.c
drivers/staging/hv/Channel.h
drivers/staging/hv/ChannelInterface.c
drivers/staging/hv/ChannelInterface.h
drivers/staging/hv/NetVsc.c
drivers/staging/hv/RndisFilter.c
drivers/staging/hv/Vmbus.c
drivers/staging/hv/include/NetVscApi.h
drivers/staging/hv/include/StorVscApi.h
drivers/staging/hv/include/VmbusApi.h
drivers/staging/hv/netvsc_drv.c
drivers/staging/hv/vmbus.h
drivers/staging/hv/vmbus_drv.c

index f8607320de486e2756b63841a36a2e480da0990b..5bea2d6bff99de4e240350fd76562f7ebd08fd79 100644 (file)
@@ -791,7 +791,7 @@ Description:
 
 --*/
 int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
-       PAGE_BUFFER                     PageBuffers[],
+       struct hv_page_buffer PageBuffers[],
        u32                             PageCount,
        void *                          Buffer,
        u32                             BufferLen,
@@ -814,7 +814,7 @@ int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
        DumpVmbusChannel(Channel);
 
        /* Adjust the size down since VMBUS_CHANNEL_PACKET_PAGE_BUFFER is the largest size we support */
-       descSize = sizeof(struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER) - ((MAX_PAGE_BUFFER_COUNT - PageCount)*sizeof(PAGE_BUFFER));
+       descSize = sizeof(struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER) - ((MAX_PAGE_BUFFER_COUNT - PageCount)*sizeof(struct hv_page_buffer));
        packetLen = descSize + BufferLen;
        packetLenAligned = ALIGN_UP(packetLen, sizeof(u64));
 
@@ -868,7 +868,7 @@ Description:
 
 --*/
 int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
-       MULTIPAGE_BUFFER        *MultiPageBuffer,
+       struct hv_multipage_buffer *MultiPageBuffer,
        void *                          Buffer,
        u32                             BufferLen,
        u64                             RequestId
index d0fd9aa623852b01d1e8b41ae0c23af7201ebec8..7fde5cb2385758d16d85395bbcbfdb3b56cf1fd5 100644 (file)
@@ -36,7 +36,7 @@ struct VMBUS_CHANNEL_PACKET_PAGE_BUFFER {
        u64 TransactionId;
        u32 Reserved;
        u32 RangeCount;
-       PAGE_BUFFER Range[MAX_PAGE_BUFFER_COUNT];
+       struct hv_page_buffer Range[MAX_PAGE_BUFFER_COUNT];
 } __attribute__((packed));
 
 /* The format must be the same as VMDATA_GPA_DIRECT */
@@ -48,7 +48,7 @@ struct VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER {
        u64 TransactionId;
        u32 Reserved;
        u32 RangeCount;         /* Always 1 in this case */
-       MULTIPAGE_BUFFER Range;
+       struct hv_multipage_buffer Range;
 } __attribute__((packed));
 
 
@@ -70,14 +70,14 @@ extern int VmbusChannelSendPacket(struct vmbus_channel *channel,
                                  u32 Flags);
 
 extern int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *channel,
-                                           PAGE_BUFFER PageBuffers[],
+                                           struct hv_page_buffer PageBuffers[],
                                            u32 PageCount,
                                            void *Buffer,
                                            u32 BufferLen,
                                            u64 RequestId);
 
 extern int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *channel,
-                                       MULTIPAGE_BUFFER *MultiPageBuffer,
+                                       struct hv_multipage_buffer *mpb,
                                        void *Buffer,
                                        u32 BufferLen,
                                        u64 RequestId);
index 0d6bef16c747f399fc72229c3bb5b8b31787aa90..3463ea3640eabaff6a11e0d6aed83c04ccfde9cc 100644 (file)
@@ -77,7 +77,7 @@ IVmbusChannelSendPacket(
 static int
 IVmbusChannelSendPacketPageBuffer(
        struct hv_device *Device,
-       PAGE_BUFFER                     PageBuffers[],
+       struct hv_page_buffer PageBuffers[],
        u32                             PageCount,
        void *                          Buffer,
        u32                             BufferLen,
@@ -95,7 +95,7 @@ IVmbusChannelSendPacketPageBuffer(
 static int
 IVmbusChannelSendPacketMultiPageBuffer(
        struct hv_device *Device,
-       MULTIPAGE_BUFFER        *MultiPageBuffer,
+       struct hv_multipage_buffer *MultiPageBuffer,
        void *                          Buffer,
        u32                             BufferLen,
        u64                             RequestId
@@ -165,7 +165,7 @@ IVmbusChannelTeardownGpadl(
 
 }
 
-void GetChannelInterface(VMBUS_CHANNEL_INTERFACE *ChannelInterface)
+void GetChannelInterface(struct vmbus_channel_interface *ChannelInterface)
 {
        ChannelInterface->Open                                          = IVmbusChannelOpen;
        ChannelInterface->Close                                         = IVmbusChannelClose;
@@ -180,7 +180,7 @@ void GetChannelInterface(VMBUS_CHANNEL_INTERFACE *ChannelInterface)
 }
 
 
-void GetChannelInfo(struct hv_device *Device, DEVICE_INFO *DeviceInfo)
+void GetChannelInfo(struct hv_device *Device, struct hv_device_info *DeviceInfo)
 {
        struct vmbus_channel_debug_info debugInfo;
 
index 49a7c7d1c1c94a1042ff2af2e44be7045c8d2d19..e24f7365ede773a67f1d9f35489e4d74c17df2c4 100644 (file)
@@ -27,8 +27,8 @@
 
 #include "include/VmbusApi.h"
 
-void GetChannelInterface(VMBUS_CHANNEL_INTERFACE *ChannelInterface);
+void GetChannelInterface(struct vmbus_channel_interface *ChannelInterface);
 
-void GetChannelInfo(struct hv_device *Device, DEVICE_INFO *DeviceInfo);
+void GetChannelInfo(struct hv_device *Device, struct hv_device_info *DeviceInfo);
 
 #endif /* _CHANNEL_INTERFACE_H_ */
index 4594277f555e3120cbf0c2a71fb33050dcdd684f..6d5ee1cd6b210df2032877913c72e48e1606ae49 100644 (file)
@@ -825,7 +825,7 @@ NetVscOnDeviceAdd(
 
        for (i=0; i < NETVSC_RECEIVE_PACKETLIST_COUNT; i++)
        {
-               packet = kzalloc(sizeof(struct hv_netvsc_packet) + (NETVSC_RECEIVE_SG_COUNT* sizeof(PAGE_BUFFER)), GFP_KERNEL);
+               packet = kzalloc(sizeof(struct hv_netvsc_packet) + (NETVSC_RECEIVE_SG_COUNT* sizeof(struct hv_page_buffer)), GFP_KERNEL);
                if (!packet)
                {
                        DPRINT_DBG(NETVSC, "unable to allocate netvsc pkts for receive pool (wanted %d got %d)", NETVSC_RECEIVE_PACKETLIST_COUNT, i);
index 36c6afdb8173a544ad11e07ae5058010c9db89a8..e6fef5fb86b818c8c0726335b7a4d29cff3bb07c 100644 (file)
@@ -72,7 +72,7 @@ typedef struct _RNDIS_REQUEST {
 
        /* Simplify allocation by having a netvsc packet inline */
        struct hv_netvsc_packet Packet;
-       PAGE_BUFFER                                     Buffer;
+       struct hv_page_buffer Buffer;
        /* FIXME: We assumed a fixed size request here. */
        struct rndis_message RequestMessage;
 } RNDIS_REQUEST;
index e39cea1434a6edf91eb1b047d34b01bbacba6f7b..b3004cb9b6c9ae7fa42858898ee0aa4808c05d05 100644 (file)
@@ -60,15 +60,12 @@ static struct hv_device* gDevice; /* vmbus root device */
 /* Internal routines */
 
 
-static void
-VmbusGetChannelInterface(
-       VMBUS_CHANNEL_INTERFACE *Interface
-       );
+static void VmbusGetChannelInterface(struct vmbus_channel_interface *Interface);
 
 static void
 VmbusGetChannelInfo(
        struct hv_device *DeviceObject,
-       DEVICE_INFO             *DeviceInfo
+       struct hv_device_info *DeviceInfo
        );
 
 static void
@@ -121,7 +118,7 @@ VmbusInitialize(
        struct hv_driver *drv
        )
 {
-       VMBUS_DRIVER_OBJECT* driver = (VMBUS_DRIVER_OBJECT*)drv;
+       struct vmbus_driver *driver = (struct vmbus_driver *)drv;
        int ret=0;
 
        DPRINT_ENTER(VMBUS);
@@ -192,10 +189,7 @@ Description:
        Get the channel interface
 
 --*/
-static void
-VmbusGetChannelInterface(
-       VMBUS_CHANNEL_INTERFACE *Interface
-       )
+static void VmbusGetChannelInterface(struct vmbus_channel_interface *Interface)
 {
        GetChannelInterface(Interface);
 }
@@ -204,7 +198,7 @@ VmbusGetChannelInterface(
 /*++;
 
 Name:
-       VmbusGetChannelInterface()
+       VmbusGetChannelInfo()
 
 Description:
        Get the device info for the specified device object
@@ -213,7 +207,7 @@ Description:
 static void
 VmbusGetChannelInfo(
        struct hv_device *DeviceObject,
-       DEVICE_INFO             *DeviceInfo
+       struct hv_device_info *DeviceInfo
        )
 {
        GetChannelInfo(DeviceObject, DeviceInfo);
@@ -235,7 +229,7 @@ struct hv_device *VmbusChildDeviceCreate(struct hv_guid *DeviceType,
                                         struct hv_guid *DeviceInstance,
                                         void *Context)
 {
-       VMBUS_DRIVER_OBJECT* vmbusDriver = (VMBUS_DRIVER_OBJECT*)gDriver;
+       struct vmbus_driver *vmbusDriver = (struct vmbus_driver *)gDriver;
 
        return vmbusDriver->OnChildDeviceCreate(
                DeviceType,
@@ -255,7 +249,7 @@ Description:
 --*/
 int VmbusChildDeviceAdd(struct hv_device *ChildDevice)
 {
-       VMBUS_DRIVER_OBJECT* vmbusDriver = (VMBUS_DRIVER_OBJECT*)gDriver;
+       struct vmbus_driver *vmbusDriver = (struct vmbus_driver *)gDriver;
 
        return vmbusDriver->OnChildDeviceAdd(gDevice, ChildDevice);
 }
@@ -272,7 +266,7 @@ Description:
 --*/
 void VmbusChildDeviceRemove(struct hv_device *ChildDevice)
 {
-       VMBUS_DRIVER_OBJECT* vmbusDriver = (VMBUS_DRIVER_OBJECT*)gDriver;
+       struct vmbus_driver *vmbusDriver = (struct vmbus_driver *)gDriver;
 
        vmbusDriver->OnChildDeviceRemove(ChildDevice);
 }
@@ -293,9 +287,9 @@ VmbusChildDeviceDestroy(
 struct hv_device  *ChildDevice
 )
 {
-VMBUS_DRIVER_OBJECT* vmbusDriver = (VMBUS_DRIVER_OBJECT*)gDriver;
+       struct vmbus_driver *vmbusDriver = (struct vmbus_driver *)gDriver;
 
-vmbusDriver->OnChildDeviceDestroy(ChildDevice);
+       vmbusDriver->OnChildDeviceDestroy(ChildDevice);
 }
 ************* */
 
@@ -381,7 +375,7 @@ VmbusOnCleanup(
        struct hv_driver *drv
        )
 {
-       /* VMBUS_DRIVER_OBJECT* driver = (VMBUS_DRIVER_OBJECT*)drv; */
+       /* struct vmbus_driver *driver = (struct vmbus_driver *)drv; */
 
        DPRINT_ENTER(VMBUS);
 
@@ -485,7 +479,7 @@ VmbusOnISR(
        struct hv_driver *drv
        )
 {
-       /* VMBUS_DRIVER_OBJECT* driver = (VMBUS_DRIVER_OBJECT*)drv; */
+       /* struct vmbus_driver *driver = (struct vmbus_driver *)drv; */
 
        int ret=0;
        /* struct page* page; */
index f83c6fc8ed18f7cfdd7bc5956fa7dd4da93cccf6..60e6fbbca666031dc401fb05c75f4d0eecea7e68 100644 (file)
@@ -102,7 +102,7 @@ struct hv_netvsc_packet {
        u32                                     TotalDataBufferLength;
        /* Points to the send/receive buffer where the ethernet frame is */
        u32                                     PageBufferCount;
-       PAGE_BUFFER                             PageBuffers[NETVSC_PACKET_MAXPAGE];
+       struct hv_page_buffer PageBuffers[NETVSC_PACKET_MAXPAGE];
 
 };
 
index 5d72f299743649587390bebb21e7fbe85ee290d2..2b3a73704af832f9f516fe5208702d16e9eb851a 100644 (file)
@@ -92,7 +92,7 @@ struct hv_storvsc_request {
        /* This points to the memory after DataBuffer */
        void *                                  Extension;
 
-       MULTIPAGE_BUFFER                DataBuffer;
+       struct hv_multipage_buffer DataBuffer;
 };
 
 
index 8b0b23350a229557ba7c8d049d470e0a063a8dc1..68a6dae4d2856cf2a325f361e42900614f358e1c 100644 (file)
 #pragma pack(push, 1)
 
 /* Single-page buffer */
-typedef struct _PAGE_BUFFER {
+struct hv_page_buffer {
        u32 Length;
        u32 Offset;
        u64 Pfn;
-} PAGE_BUFFER;
+};
 
 /* Multiple-page buffer */
-typedef struct _MULTIPAGE_BUFFER {
+struct hv_multipage_buffer {
        /* Length and Offset determines the # of pfns in the array */
        u32 Length;
        u32 Offset;
        u64 PfnArray[MAX_MULTIPAGE_BUFFER_COUNT];
-} MULTIPAGE_BUFFER;
+};
 
 /* 0x18 includes the proprietary packet header */
 #define MAX_PAGE_BUFFER_PACKET         (0x18 +                 \
-                                       (sizeof(PAGE_BUFFER) *  \
+                                       (sizeof(struct hv_page_buffer) * \
                                         MAX_PAGE_BUFFER_COUNT))
-#define MAX_MULTIPAGE_BUFFER_PACKET    (0x18 + sizeof(MULTIPAGE_BUFFER))
+#define MAX_MULTIPAGE_BUFFER_PACKET    (0x18 +                 \
+                                        sizeof(struct hv_multipage_buffer))
 
 
 #pragma pack(pop)
@@ -69,7 +70,7 @@ typedef int (*PFN_ON_ISR)(struct hv_driver *drv);
 typedef void (*PFN_ON_DPC)(struct hv_driver *drv);
 typedef void (*PFN_GET_CHANNEL_OFFERS)(void);
 
-typedef struct hv_device *(*PFN_ON_CHILDDEVICE_CREATE)
+typedef struct hv_device * (*PFN_ON_CHILDDEVICE_CREATE)
                                (struct hv_guid *DeviceType,
                                 struct hv_guid *DeviceInstance,
                                 void *Context);
@@ -94,14 +95,14 @@ typedef int (*VMBUS_CHANNEL_SEND_PACKET)(struct hv_device *Device,
                                         u32 Type,
                                         u32 Flags);
 typedef int (*VMBUS_CHANNEL_SEND_PACKET_PAGEBUFFER)(struct hv_device *Device,
-                                                   PAGE_BUFFER PageBuffers[],
-                                                   u32 PageCount,
-                                                   void *Buffer,
-                                                   u32 BufferLen,
-                                                   u64 RequestId);
-typedef int(*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)
+                                       struct hv_page_buffer PageBuffers[],
+                                       u32 PageCount,
+                                       void *Buffer,
+                                       u32 BufferLen,
+                                       u64 RequestId);
+typedef int (*VMBUS_CHANNEL_SEND_PACKET_MULTIPAGEBUFFER)
                                        (struct hv_device *Device,
-                                        MULTIPAGE_BUFFER *MultiPageBuffer,
+                                        struct hv_multipage_buffer *mpb,
                                         void *Buffer,
                                         u32 BufferLen,
                                         u64 RequestId);
@@ -123,15 +124,15 @@ typedef int (*VMBUS_CHANNEL_TEARDOWN_GPADL)(struct hv_device *Device,
                                            u32 GpadlHandle);
 
 
-typedef struct _PORT_INFO {
+struct hv_dev_port_info {
        u32 InterruptMask;
        u32 ReadIndex;
        u32 WriteIndex;
        u32 BytesAvailToRead;
        u32 BytesAvailToWrite;
-} PORT_INFO;
+};
 
-typedef struct _DEVICE_INFO {
+struct hv_device_info {
        u32 ChannelId;
        u32 ChannelState;
        struct hv_guid ChannelType;
@@ -145,14 +146,14 @@ typedef struct _DEVICE_INFO {
        u32 ClientMonitorLatency;
        u32 ClientMonitorConnectionId;
 
-       PORT_INFO Inbound;
-       PORT_INFO Outbound;
-} DEVICE_INFO;
+       struct hv_dev_port_info Inbound;
+       struct hv_dev_port_info Outbound;
+};
 
 typedef void (*VMBUS_GET_CHANNEL_INFO)(struct hv_device *Device,
-                                      DEVICE_INFO *DeviceInfo);
+                                      struct hv_device_info *DeviceInfo);
 
-typedef struct _VMBUS_CHANNEL_INTERFACE {
+struct vmbus_channel_interface {
        VMBUS_CHANNEL_OPEN Open;
        VMBUS_CHANNEL_CLOSE Close;
        VMBUS_CHANNEL_SEND_PACKET SendPacket;
@@ -163,9 +164,9 @@ typedef struct _VMBUS_CHANNEL_INTERFACE {
        VMBUS_CHANNEL_ESTABLISH_GPADL EstablishGpadl;
        VMBUS_CHANNEL_TEARDOWN_GPADL TeardownGpadl;
        VMBUS_GET_CHANNEL_INFO GetInfo;
-} VMBUS_CHANNEL_INTERFACE;
+};
 
-typedef void (*VMBUS_GET_CHANNEL_INTERFACE)(VMBUS_CHANNEL_INTERFACE *Interface);
+typedef void (*VMBUS_GET_CHANNEL_INTERFACE)(struct vmbus_channel_interface *i);
 
 /* Base driver object */
 struct hv_driver {
@@ -181,7 +182,7 @@ struct hv_driver {
        PFN_ON_GETDEVICEIDS OnGetDeviceIds;
        PFN_ON_CLEANUP OnCleanup;
 
-       VMBUS_CHANNEL_INTERFACE VmbusChannelInterface;
+       struct vmbus_channel_interface VmbusChannelInterface;
 };
 
 /* Base device object */
@@ -204,7 +205,7 @@ struct hv_device {
 };
 
 /* Vmbus driver object */
-typedef struct _VMBUS_DRIVER_OBJECT {
+struct vmbus_driver {
        /* !! Must be the 1st field !! */
        /* FIXME if ^, then someone is doing somthing stupid */
        struct hv_driver Base;
@@ -223,7 +224,7 @@ typedef struct _VMBUS_DRIVER_OBJECT {
 
        VMBUS_GET_CHANNEL_INTERFACE GetChannelInterface;
        VMBUS_GET_CHANNEL_INFO GetChannelInfo;
-} VMBUS_DRIVER_OBJECT;
+};
 
 int VmbusInitialize(struct hv_driver *drv);
 
index 9ea61b281ef41601d47d6e0cec95b5c07e756be4..bd11853b5c8493fb630da61e8a410ff958348efb 100644 (file)
@@ -429,14 +429,14 @@ static int netvsc_start_xmit (struct sk_buff *skb, struct net_device *net)
        num_frags = skb_shinfo(skb)->nr_frags + 1 + net_drv_obj->AdditionalRequestPageBufferCount;
 
        /* Allocate a netvsc packet based on # of frags. */
-       packet = kzalloc(sizeof(struct hv_netvsc_packet) + (num_frags * sizeof(PAGE_BUFFER)) + net_drv_obj->RequestExtSize, GFP_ATOMIC);
+       packet = kzalloc(sizeof(struct hv_netvsc_packet) + (num_frags * sizeof(struct hv_page_buffer)) + net_drv_obj->RequestExtSize, GFP_ATOMIC);
        if (!packet)
        {
                DPRINT_ERR(NETVSC_DRV, "unable to allocate hv_netvsc_packet");
                return -1;
        }
 
-       packet->Extension = (void*)(unsigned long)packet + sizeof(struct hv_netvsc_packet) + (num_frags * sizeof(PAGE_BUFFER)) ;
+       packet->Extension = (void*)(unsigned long)packet + sizeof(struct hv_netvsc_packet) + (num_frags * sizeof(struct hv_page_buffer)) ;
 
        /* Setup the rndis header */
        packet->PageBufferCount = num_frags;
index 733edc9ab1018ec8d7041d7e1bd1428dd4918aed..d47b291bbe615a38b248a03cbadb461773619724 100644 (file)
@@ -76,6 +76,6 @@ static inline struct driver_context *driver_to_driver_context(struct device_driv
 
 int vmbus_child_driver_register(struct driver_context *driver_ctx);
 void vmbus_child_driver_unregister(struct driver_context *driver_ctx);
-void vmbus_get_interface(VMBUS_CHANNEL_INTERFACE *interface);
+void vmbus_get_interface(struct vmbus_channel_interface *interface);
 
 #endif /* _VMBUS_H_ */
index 1700dd3be81188f182fa09b59b94f2d6c9efed3c..7d6353106697c1cd1f927222a329176ff32e84af 100644 (file)
@@ -49,7 +49,7 @@ struct vmbus_driver_context {
        /* The driver field is not used in here. Instead, the bus field is */
        /* used to represent the driver */
        struct driver_context   drv_ctx;
-       VMBUS_DRIVER_OBJECT             drv_obj;
+       struct vmbus_driver drv_obj;
 
        struct bus_type                 bus;
        struct tasklet_struct   msg_dpc;
@@ -79,7 +79,7 @@ static struct hv_device *vmbus_child_device_create(struct hv_guid *type, struct
 static void vmbus_child_device_destroy(struct hv_device *device_obj);
 static int vmbus_child_device_register(struct hv_device *root_device_obj, struct hv_device *child_device_obj);
 static void vmbus_child_device_unregister(struct hv_device *child_device_obj);
-static void vmbus_child_device_get_info(struct hv_device *device_obj, DEVICE_INFO *device_info);
+static void vmbus_child_device_get_info(struct hv_device *device_obj, struct hv_device_info *device_info);
 
 /* static ssize_t vmbus_show_class_id(struct device *dev, struct device_attribute *attr, char *buf); */
 /* static ssize_t vmbus_show_device_id(struct device *dev, struct device_attribute *attr, char *buf); */
@@ -159,9 +159,9 @@ Desc:       Show the device attribute in sysfs. This is invoked when user does a "cat
 static ssize_t vmbus_show_device_attr(struct device *dev, struct device_attribute *dev_attr, char *buf)
 {
        struct device_context *device_ctx = device_to_device_context(dev);
-       DEVICE_INFO device_info;
+       struct hv_device_info device_info;
 
-       memset(&device_info, 0, sizeof(DEVICE_INFO));
+       memset(&device_info, 0, sizeof(struct hv_device_info));
 
        vmbus_child_device_get_info(&device_ctx->device_obj, &device_info);
 
@@ -325,7 +325,7 @@ static int vmbus_bus_init(PFN_DRIVERINITIALIZE pfn_drv_init)
        unsigned int vector=0;
 
        struct vmbus_driver_context *vmbus_drv_ctx=&g_vmbus_drv;
-       VMBUS_DRIVER_OBJECT *vmbus_drv_obj=&g_vmbus_drv.drv_obj;
+       struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
 
        struct device_context *dev_ctx=&g_vmbus_drv.device_ctx;
 
@@ -446,7 +446,7 @@ Desc:       Terminate the vmbus driver. This routine is opposite of vmbus_bus_init()
 --*/
 static void vmbus_bus_exit(void)
 {
-       VMBUS_DRIVER_OBJECT *vmbus_drv_obj=&g_vmbus_drv.drv_obj;
+       struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
        struct vmbus_driver_context *vmbus_drv_ctx=&g_vmbus_drv;
 
        struct device_context *dev_ctx=&g_vmbus_drv.device_ctx;
@@ -484,7 +484,7 @@ Desc:       Register a vmbus's child driver
 --*/
 int vmbus_child_driver_register(struct driver_context* driver_ctx)
 {
-       VMBUS_DRIVER_OBJECT *vmbus_drv_obj=&g_vmbus_drv.drv_obj;
+       struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
        int ret;
 
        DPRINT_ENTER(VMBUS_DRV);
@@ -534,9 +534,9 @@ Name:       vmbus_get_interface()
 Desc:  Get the vmbus channel interface. This is invoked by child/client driver that sits
                above vmbus
 --*/
-void vmbus_get_interface(VMBUS_CHANNEL_INTERFACE *interface)
+void vmbus_get_interface(struct vmbus_channel_interface *interface)
 {
-       VMBUS_DRIVER_OBJECT *vmbus_drv_obj=&g_vmbus_drv.drv_obj;
+       struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
 
        vmbus_drv_obj->GetChannelInterface(interface);
 }
@@ -550,9 +550,9 @@ Name:       vmbus_child_device_get_info()
 
 Desc:  Get the vmbus child device info. This is invoked to display various device attributes in sysfs.
 --*/
-static void vmbus_child_device_get_info(struct hv_device *device_obj, DEVICE_INFO *device_info)
+static void vmbus_child_device_get_info(struct hv_device *device_obj, struct hv_device_info *device_info)
 {
-       VMBUS_DRIVER_OBJECT *vmbus_drv_obj=&g_vmbus_drv.drv_obj;
+       struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
 
        vmbus_drv_obj->GetChannelInfo(device_obj, device_info);
 }
@@ -1000,7 +1000,7 @@ Desc:     Tasklet routine to handle hypervisor messages
 --*/
 static void vmbus_msg_dpc(unsigned long data)
 {
-       VMBUS_DRIVER_OBJECT* vmbus_drv_obj = (VMBUS_DRIVER_OBJECT*)data;
+       struct vmbus_driver *vmbus_drv_obj = (struct vmbus_driver *)data;
 
        DPRINT_ENTER(VMBUS_DRV);
 
@@ -1021,7 +1021,7 @@ Desc:     Tasklet routine to handle hypervisor events
 --*/
 static void vmbus_event_dpc(unsigned long data)
 {
-       VMBUS_DRIVER_OBJECT* vmbus_drv_obj = (VMBUS_DRIVER_OBJECT*)data;
+       struct vmbus_driver *vmbus_drv_obj = (struct vmbus_driver *)data;
 
        DPRINT_ENTER(VMBUS_DRV);
 
@@ -1043,7 +1043,7 @@ Desc:     ISR routine
 static irqreturn_t vmbus_isr(int irq, void* dev_id)
 {
        int ret=0;
-       VMBUS_DRIVER_OBJECT* vmbus_driver_obj = &g_vmbus_drv.drv_obj;
+       struct vmbus_driver *vmbus_driver_obj = &g_vmbus_drv.drv_obj;
 
        DPRINT_ENTER(VMBUS_DRV);