Staging: hv: clean up typedefs in ChannelMgmt.h

This removes the typedefs from ChannelMgmt.h, it's now clean from a
codingstyle.pl standpoint.

Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c
index a8398a2..78850f3 100644
--- a/drivers/staging/hv/Channel.c
+++ b/drivers/staging/hv/Channel.c
@@ -29,24 +29,14 @@
 #include "VmbusPrivate.h"
 
 /* Internal routines */
-static int
-VmbusChannelCreateGpadlHeader(
+static int VmbusChannelCreateGpadlHeader(
 	void *					Kbuffer,	/* must be phys and virt contiguous */
 	u32					Size,		/* page-size multiple */
-	VMBUS_CHANNEL_MSGINFO	**msgInfo,
+	struct vmbus_channel_msginfo **msgInfo,
 	u32					*MessageCount
 	);
-
-static void
-DumpVmbusChannel(
-	VMBUS_CHANNEL			*Channel
-	);
-
-
-static void
-VmbusChannelSetEvent(
-	VMBUS_CHANNEL			*Channel
-	);
+static void DumpVmbusChannel(struct vmbus_channel *channel);
+static void VmbusChannelSetEvent(struct vmbus_channel *channel);
 
 
 #if 0
@@ -93,10 +83,7 @@
 	Trigger an event notification on the specified channel.
 
 --*/
-static void
-VmbusChannelSetEvent(
-	VMBUS_CHANNEL			*Channel
-	)
+static void VmbusChannelSetEvent(struct vmbus_channel *Channel)
 {
 	HV_MONITOR_PAGE *monitorPage;
 
@@ -125,10 +112,7 @@
 }
 
 #if 0
-static void
-VmbusChannelClearEvent(
-	VMBUS_CHANNEL			*Channel
-	)
+static void VmbusChannelClearEvent(struct vmbus_channel *channel)
 {
 	HV_MONITOR_PAGE *monitorPage;
 
@@ -160,11 +144,8 @@
 	Retrieve various channel debug info
 
 --*/
-void
-VmbusChannelGetDebugInfo(
-	VMBUS_CHANNEL				*Channel,
-	VMBUS_CHANNEL_DEBUG_INFO	*DebugInfo
-	)
+void VmbusChannelGetDebugInfo(struct vmbus_channel *Channel,
+			      struct vmbus_channel_debug_info *DebugInfo)
 {
 	HV_MONITOR_PAGE *monitorPage;
     u8 monitorGroup    = (u8)Channel->OfferMsg.MonitorId / 32;
@@ -204,9 +185,7 @@
 	Open the specified channel.
 
 --*/
-int
-VmbusChannelOpen(
-	VMBUS_CHANNEL			*NewChannel,
+int VmbusChannelOpen(struct vmbus_channel *NewChannel,
 	u32					SendRingBufferSize,
 	u32					RecvRingBufferSize,
 	void *					UserData,
@@ -217,7 +196,7 @@
 {
 	int ret=0;
 	VMBUS_CHANNEL_OPEN_CHANNEL* openMsg;
-	VMBUS_CHANNEL_MSGINFO* openInfo;
+	struct vmbus_channel_msginfo *openInfo;
 	void *in, *out;
 	unsigned long flags;
 
@@ -266,7 +245,7 @@
 		SendRingBufferSize);
 
 	/* Create and init the channel open message */
-	openInfo = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_OPEN_CHANNEL), GFP_KERNEL);
+	openInfo = kmalloc(sizeof(*openInfo) + sizeof(VMBUS_CHANNEL_OPEN_CHANNEL), GFP_KERNEL);
 	ASSERT(openInfo != NULL);
 
 	openInfo->WaitEvent = osd_WaitEventCreate();
@@ -399,7 +378,7 @@
 VmbusChannelCreateGpadlHeader(
 	void *					Kbuffer,	/* from kmalloc() */
 	u32					Size,		/* page-size multiple */
-	VMBUS_CHANNEL_MSGINFO	**MsgInfo,
+	struct vmbus_channel_msginfo **MsgInfo,
 	u32					*MessageCount)
 {
 	int i;
@@ -407,8 +386,8 @@
     unsigned long long pfn;
 	VMBUS_CHANNEL_GPADL_HEADER* gpaHeader;
 	VMBUS_CHANNEL_GPADL_BODY* gpadlBody;
-	VMBUS_CHANNEL_MSGINFO* msgHeader;
-	VMBUS_CHANNEL_MSGINFO* msgBody;
+	struct vmbus_channel_msginfo *msgHeader;
+	struct vmbus_channel_msginfo *msgBody;
 	u32				msgSize;
 
 	int pfnSum, pfnCount, pfnLeft, pfnCurr, pfnSize;
@@ -426,7 +405,7 @@
 	if (pageCount > pfnCount) /* we need a gpadl body */
 	{
 		/* fill in the header */
-		msgSize = sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_HEADER) + sizeof(GPA_RANGE) + pfnCount*sizeof(u64);
+		msgSize = sizeof(struct vmbus_channel_msginfo) + sizeof(VMBUS_CHANNEL_GPADL_HEADER) + sizeof(GPA_RANGE) + pfnCount*sizeof(u64);
 		msgHeader =  kzalloc(msgSize, GFP_KERNEL);
 
 		INITIALIZE_LIST_HEAD(&msgHeader->SubMsgList);
@@ -463,7 +442,7 @@
 				pfnCurr = pfnLeft;
 			}
 
-			msgSize = sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_BODY) + pfnCurr*sizeof(u64);
+			msgSize = sizeof(struct vmbus_channel_msginfo) + sizeof(VMBUS_CHANNEL_GPADL_BODY) + pfnCurr*sizeof(u64);
 			msgBody = kzalloc(msgSize, GFP_KERNEL);
 			ASSERT(msgBody);
 			msgBody->MessageSize = msgSize;
@@ -486,7 +465,7 @@
 	else
 	{
 		/* everything fits in a header */
-		msgSize = sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_HEADER) + sizeof(GPA_RANGE) + pageCount*sizeof(u64);
+		msgSize = sizeof(struct vmbus_channel_msginfo) + sizeof(VMBUS_CHANNEL_GPADL_HEADER) + sizeof(GPA_RANGE) + pageCount*sizeof(u64);
 		msgHeader = kzalloc(msgSize, GFP_KERNEL);
 		msgHeader->MessageSize=msgSize;
 
@@ -517,9 +496,7 @@
 	Estabish a GPADL for the specified buffer
 
 --*/
-int
-VmbusChannelEstablishGpadl(
-	VMBUS_CHANNEL	*Channel,
+int VmbusChannelEstablishGpadl(struct vmbus_channel *Channel,
 	void *			Kbuffer,	/* from kmalloc() */
 	u32			Size,		/* page-size multiple */
 	u32			*GpadlHandle
@@ -530,8 +507,8 @@
 	VMBUS_CHANNEL_GPADL_BODY* gpadlBody;
 	/* VMBUS_CHANNEL_GPADL_CREATED* gpadlCreated; */
 
-	VMBUS_CHANNEL_MSGINFO *msgInfo;
-	VMBUS_CHANNEL_MSGINFO *subMsgInfo;
+	struct vmbus_channel_msginfo *msgInfo;
+	struct vmbus_channel_msginfo *subMsgInfo;
 
 	u32 msgCount;
 	LIST_ENTRY* anchor;
@@ -562,9 +539,9 @@
 
 	DPRINT_DBG(VMBUS, "buffer %p, size %d msg cnt %d", Kbuffer, Size, msgCount);
 
-	DPRINT_DBG(VMBUS, "Sending GPADL Header - len %zd", msgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
+	DPRINT_DBG(VMBUS, "Sending GPADL Header - len %zd", msgInfo->MessageSize - sizeof(*msgInfo));
 
-	ret = VmbusPostMessage(gpadlMsg, msgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
+	ret = VmbusPostMessage(gpadlMsg, msgInfo->MessageSize - sizeof(*msgInfo));
 	if (ret != 0)
 	{
 		DPRINT_ERR(VMBUS, "Unable to open channel - %d", ret);
@@ -575,16 +552,16 @@
 	{
 		ITERATE_LIST_ENTRIES(anchor, curr, &msgInfo->SubMsgList)
 		{
-			subMsgInfo = (VMBUS_CHANNEL_MSGINFO*) curr;
+			subMsgInfo = (struct vmbus_channel_msginfo*)curr;
 			gpadlBody = (VMBUS_CHANNEL_GPADL_BODY*)subMsgInfo->Msg;
 
 			gpadlBody->Header.MessageType = ChannelMessageGpadlBody;
 			gpadlBody->Gpadl = nextGpadlHandle;
 
-			DPRINT_DBG(VMBUS, "Sending GPADL Body - len %zd", subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
+			DPRINT_DBG(VMBUS, "Sending GPADL Body - len %zd", subMsgInfo->MessageSize - sizeof(*subMsgInfo));
 
-			DumpGpadlBody(gpadlBody, subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
-			ret = VmbusPostMessage(gpadlBody, subMsgInfo->MessageSize - sizeof(VMBUS_CHANNEL_MSGINFO));
+			DumpGpadlBody(gpadlBody, subMsgInfo->MessageSize - sizeof(*subMsgInfo));
+			ret = VmbusPostMessage(gpadlBody, subMsgInfo->MessageSize - sizeof(*subMsgInfo));
 			ASSERT(ret == 0);
 		}
 	}
@@ -622,22 +599,18 @@
 	Teardown the specified GPADL handle
 
 --*/
-int
-VmbusChannelTeardownGpadl(
-	VMBUS_CHANNEL	*Channel,
-	u32			GpadlHandle
-	)
+int VmbusChannelTeardownGpadl(struct vmbus_channel *Channel, u32 GpadlHandle)
 {
 	int ret=0;
 	VMBUS_CHANNEL_GPADL_TEARDOWN *msg;
-	VMBUS_CHANNEL_MSGINFO* info;
+	struct vmbus_channel_msginfo *info;
 	unsigned long flags;
 
 	DPRINT_ENTER(VMBUS);
 
 	ASSERT(GpadlHandle != 0);
 
-	info = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_GPADL_TEARDOWN), GFP_KERNEL);
+	info = kmalloc(sizeof(*info) + sizeof(VMBUS_CHANNEL_GPADL_TEARDOWN), GFP_KERNEL);
 	ASSERT(info != NULL);
 
 	info->WaitEvent = osd_WaitEventCreate();
@@ -683,14 +656,11 @@
 	Close the specified channel
 
 --*/
-void
-VmbusChannelClose(
-	VMBUS_CHANNEL	*Channel
-	)
+void VmbusChannelClose(struct vmbus_channel *Channel)
 {
 	int ret=0;
 	VMBUS_CHANNEL_CLOSE_CHANNEL* msg;
-	VMBUS_CHANNEL_MSGINFO* info;
+	struct vmbus_channel_msginfo *info;
 	unsigned long flags;
 
 	DPRINT_ENTER(VMBUS);
@@ -700,7 +670,7 @@
 	del_timer(&Channel->poll_timer);
 
 	/* Send a closing message */
-	info = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_CLOSE_CHANNEL), GFP_KERNEL);
+	info = kmalloc(sizeof(*info) + sizeof(VMBUS_CHANNEL_CLOSE_CHANNEL), GFP_KERNEL);
 	ASSERT(info != NULL);
 
 	/* info->waitEvent = osd_WaitEventCreate(); */
@@ -760,9 +730,7 @@
 	Send the specified buffer on the given channel
 
 --*/
-int
-VmbusChannelSendPacket(
-	VMBUS_CHANNEL		*Channel,
+int VmbusChannelSendPacket(struct vmbus_channel *Channel,
 	const void *			Buffer,
 	u32				BufferLen,
 	u64				RequestId,
@@ -822,9 +790,7 @@
 	Send a range of single-page buffer packets using a GPADL Direct packet type.
 
 --*/
-int
-VmbusChannelSendPacketPageBuffer(
-	VMBUS_CHANNEL		*Channel,
+int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *Channel,
 	PAGE_BUFFER			PageBuffers[],
 	u32				PageCount,
 	void *				Buffer,
@@ -901,9 +867,7 @@
 	Send a multi-page buffer packet using a GPADL Direct packet type.
 
 --*/
-int
-VmbusChannelSendPacketMultiPageBuffer(
-	VMBUS_CHANNEL		*Channel,
+int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *Channel,
 	MULTIPAGE_BUFFER	*MultiPageBuffer,
 	void *				Buffer,
 	u32				BufferLen,
@@ -980,7 +944,7 @@
 
 --*/
 /* TODO: Do we ever receive a gpa direct packet other than the ones we send ? */
-int VmbusChannelRecvPacket(VMBUS_CHANNEL *Channel,
+int VmbusChannelRecvPacket(struct vmbus_channel *Channel,
 			   void *Buffer,
 			   u32 BufferLen,
 			   u32 *BufferActualLen,
@@ -1055,9 +1019,7 @@
 	Retrieve the raw packet on the specified channel
 
 --*/
-int
-VmbusChannelRecvPacketRaw(
-	VMBUS_CHANNEL		*Channel,
+int VmbusChannelRecvPacketRaw(struct vmbus_channel *Channel,
 	void *				Buffer,
 	u32				BufferLen,
 	u32*				BufferActualLen,
@@ -1132,7 +1094,7 @@
 	Channel event callback
 
 --*/
-void VmbusChannelOnChannelEvent(VMBUS_CHANNEL *Channel)
+void VmbusChannelOnChannelEvent(struct vmbus_channel *Channel)
 {
 	DumpVmbusChannel(Channel);
 	ASSERT(Channel->OnChannelCallback);
@@ -1157,7 +1119,7 @@
 --*/
 void VmbusChannelOnTimer(unsigned long data)
 {
-	VMBUS_CHANNEL *channel = (VMBUS_CHANNEL*)data;
+	struct vmbus_channel *channel = (struct vmbus_channel *)data;
 
 	if (channel->OnChannelCallback)
 	{
@@ -1179,10 +1141,7 @@
 	Dump vmbus channel info to the console
 
 --*/
-static void
-DumpVmbusChannel(
-	VMBUS_CHANNEL		*Channel
-	)
+static void DumpVmbusChannel(struct vmbus_channel *Channel)
 {
 	DPRINT_DBG(VMBUS, "Channel (%d)", Channel->OfferMsg.ChildRelId);
 	DumpRingInfo(&Channel->Outbound, "Outbound ");
diff --git a/drivers/staging/hv/Channel.h b/drivers/staging/hv/Channel.h
index 4fc5baf..c741dc1 100644
--- a/drivers/staging/hv/Channel.h
+++ b/drivers/staging/hv/Channel.h
@@ -53,7 +53,7 @@
 } __attribute__((packed));
 
 
-extern int VmbusChannelOpen(VMBUS_CHANNEL *Channel,
+extern int VmbusChannelOpen(struct vmbus_channel *channel,
 			    u32 SendRingBufferSize,
 			    u32 RecvRingBufferSize,
 			    void *UserData,
@@ -61,52 +61,52 @@
 			    PFN_CHANNEL_CALLBACK pfnOnChannelCallback,
 			    void *Context);
 
-extern void VmbusChannelClose(VMBUS_CHANNEL *Channel);
+extern void VmbusChannelClose(struct vmbus_channel *channel);
 
-extern int VmbusChannelSendPacket(VMBUS_CHANNEL *Channel,
+extern int VmbusChannelSendPacket(struct vmbus_channel *channel,
 				  const void *Buffer,
 				  u32 BufferLen,
 				  u64 RequestId,
 				  VMBUS_PACKET_TYPE Type,
 				  u32 Flags);
 
-extern int VmbusChannelSendPacketPageBuffer(VMBUS_CHANNEL *Channel,
+extern int VmbusChannelSendPacketPageBuffer(struct vmbus_channel *channel,
 					    PAGE_BUFFER PageBuffers[],
 					    u32 PageCount,
 					    void *Buffer,
 					    u32 BufferLen,
 					    u64 RequestId);
 
-extern int VmbusChannelSendPacketMultiPageBuffer(VMBUS_CHANNEL *Channel,
+extern int VmbusChannelSendPacketMultiPageBuffer(struct vmbus_channel *channel,
 					MULTIPAGE_BUFFER *MultiPageBuffer,
 					void *Buffer,
 					u32 BufferLen,
 					u64 RequestId);
 
-extern int VmbusChannelEstablishGpadl(VMBUS_CHANNEL *Channel,
+extern int VmbusChannelEstablishGpadl(struct vmbus_channel *channel,
 				      void *Kbuffer,
 				      u32 Size,
 				      u32 *GpadlHandle);
 
-extern int VmbusChannelTeardownGpadl(VMBUS_CHANNEL *Channel,
+extern int VmbusChannelTeardownGpadl(struct vmbus_channel *channel,
 				     u32 GpadlHandle);
 
-extern int VmbusChannelRecvPacket(VMBUS_CHANNEL *Channel,
+extern int VmbusChannelRecvPacket(struct vmbus_channel *channel,
 				  void *Buffer,
 				  u32 BufferLen,
 				  u32 *BufferActualLen,
 				  u64 *RequestId);
 
-extern int VmbusChannelRecvPacketRaw(VMBUS_CHANNEL *Channel,
+extern int VmbusChannelRecvPacketRaw(struct vmbus_channel *channel,
 				     void *Buffer,
 				     u32 BufferLen,
 				     u32 *BufferActualLen,
 				     u64 *RequestId);
 
-extern void VmbusChannelOnChannelEvent(VMBUS_CHANNEL *Channel);
+extern void VmbusChannelOnChannelEvent(struct vmbus_channel *channel);
 
-extern void VmbusChannelGetDebugInfo(VMBUS_CHANNEL *Channel,
-				     VMBUS_CHANNEL_DEBUG_INFO *DebugInfo);
+extern void VmbusChannelGetDebugInfo(struct vmbus_channel *channel,
+				     struct vmbus_channel_debug_info *debug);
 
 extern void VmbusChannelOnTimer(unsigned long data);
 
diff --git a/drivers/staging/hv/ChannelInterface.c b/drivers/staging/hv/ChannelInterface.c
index 23a1e17..451a1a5 100644
--- a/drivers/staging/hv/ChannelInterface.c
+++ b/drivers/staging/hv/ChannelInterface.c
@@ -38,7 +38,7 @@
 	void *				Context
 	)
 {
-	return VmbusChannelOpen( (VMBUS_CHANNEL*)Device->context,
+	return VmbusChannelOpen((struct vmbus_channel *)Device->context,
 								SendBufferSize,
 								RecvRingBufferSize,
 								UserData,
@@ -53,7 +53,7 @@
 	struct hv_device *Device
 	)
 {
-	VmbusChannelClose((VMBUS_CHANNEL*)Device->context);
+	VmbusChannelClose((struct vmbus_channel *)Device->context);
 }
 
 
@@ -67,7 +67,7 @@
 	u32				Flags
 	)
 {
-	return VmbusChannelSendPacket((VMBUS_CHANNEL*)Device->context,
+	return VmbusChannelSendPacket((struct vmbus_channel *)Device->context,
 									Buffer,
 									BufferLen,
 									RequestId,
@@ -85,7 +85,7 @@
 	u64				RequestId
 	)
 {
-	return VmbusChannelSendPacketPageBuffer((VMBUS_CHANNEL*)Device->context,
+	return VmbusChannelSendPacketPageBuffer((struct vmbus_channel *)Device->context,
 												PageBuffers,
 												PageCount,
 												Buffer,
@@ -102,7 +102,7 @@
 	u64				RequestId
 	)
 {
-	return VmbusChannelSendPacketMultiPageBuffer((VMBUS_CHANNEL*)Device->context,
+	return VmbusChannelSendPacketMultiPageBuffer((struct vmbus_channel *)Device->context,
 													MultiPageBuffer,
 													Buffer,
 													BufferLen,
@@ -118,7 +118,7 @@
 	u64*				RequestId
 	)
 {
-	return VmbusChannelRecvPacket((VMBUS_CHANNEL*)Device->context,
+	return VmbusChannelRecvPacket((struct vmbus_channel *)Device->context,
 									Buffer,
 									BufferLen,
 									BufferActualLen,
@@ -134,7 +134,7 @@
 	u64*				RequestId
 	)
 {
-	return VmbusChannelRecvPacketRaw((VMBUS_CHANNEL*)Device->context,
+	return VmbusChannelRecvPacketRaw((struct vmbus_channel *)Device->context,
 										Buffer,
 										BufferLen,
 										BufferActualLen,
@@ -149,7 +149,7 @@
 	u32*				GpadlHandle
 	)
 {
-	return VmbusChannelEstablishGpadl((VMBUS_CHANNEL*)Device->context,
+	return VmbusChannelEstablishGpadl((struct vmbus_channel *)Device->context,
 										Buffer,
 										BufferLen,
 										GpadlHandle);
@@ -161,7 +161,7 @@
    u32				GpadlHandle
 	)
 {
-	return VmbusChannelTeardownGpadl((VMBUS_CHANNEL*)Device->context,
+	return VmbusChannelTeardownGpadl((struct vmbus_channel *)Device->context,
 										GpadlHandle);
 
 }
@@ -183,11 +183,11 @@
 
 void GetChannelInfo(struct hv_device *Device, DEVICE_INFO *DeviceInfo)
 {
-	VMBUS_CHANNEL_DEBUG_INFO debugInfo;
+	struct vmbus_channel_debug_info debugInfo;
 
 	if (Device->context)
 	{
-		VmbusChannelGetDebugInfo((VMBUS_CHANNEL*)Device->context, &debugInfo);
+		VmbusChannelGetDebugInfo((struct vmbus_channel *)Device->context, &debugInfo);
 
 		DeviceInfo->ChannelId = debugInfo.RelId;
 		DeviceInfo->ChannelState = debugInfo.State;
diff --git a/drivers/staging/hv/ChannelMgmt.c b/drivers/staging/hv/ChannelMgmt.c
index 4680e14..ebf4f7e 100644
--- a/drivers/staging/hv/ChannelMgmt.c
+++ b/drivers/staging/hv/ChannelMgmt.c
@@ -131,11 +131,11 @@
 	Allocate and initialize a vmbus channel object
 
 --*/
-VMBUS_CHANNEL* AllocVmbusChannel(void)
+struct vmbus_channel *AllocVmbusChannel(void)
 {
-	VMBUS_CHANNEL* channel;
+	struct vmbus_channel *channel;
 
-	channel = kzalloc(sizeof(VMBUS_CHANNEL), GFP_ATOMIC);
+	channel = kzalloc(sizeof(*channel), GFP_ATOMIC);
 	if (!channel)
 	{
 		return NULL;
@@ -169,7 +169,7 @@
 --*/
 static inline void ReleaseVmbusChannel(void* Context)
 {
-	VMBUS_CHANNEL* channel = (VMBUS_CHANNEL*)Context;
+	struct vmbus_channel *channel = Context;
 
 	DPRINT_ENTER(VMBUS);
 
@@ -191,7 +191,7 @@
 	Release the resources used by the vmbus channel object
 
 --*/
-void FreeVmbusChannel(VMBUS_CHANNEL* Channel)
+void FreeVmbusChannel(struct vmbus_channel *Channel)
 {
 	del_timer(&Channel->poll_timer);
 
@@ -217,11 +217,11 @@
 	)
 {
 	int ret=0;
-	VMBUS_CHANNEL* newChannel=(VMBUS_CHANNEL*)context;
+	struct vmbus_channel *newChannel = context;
+	struct vmbus_channel *channel;
 	LIST_ENTRY* anchor;
 	LIST_ENTRY* curr;
 	bool fNew = true;
-	VMBUS_CHANNEL* channel;
 	unsigned long flags;
 
 	DPRINT_ENTER(VMBUS);
@@ -231,7 +231,7 @@
 
 	ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelList)
 	{
-		channel = CONTAINING_RECORD(curr, VMBUS_CHANNEL, ListEntry);
+		channel = CONTAINING_RECORD(curr, struct vmbus_channel, ListEntry);
 
 		if (!memcmp(&channel->OfferMsg.Offer.InterfaceType, &newChannel->OfferMsg.Offer.InterfaceType,sizeof(GUID)) &&
 			!memcmp(&channel->OfferMsg.Offer.InterfaceInstance, &newChannel->OfferMsg.Offer.InterfaceInstance, sizeof(GUID)))
@@ -308,7 +308,7 @@
 	void * context
 	)
 {
-	VMBUS_CHANNEL* channel=(VMBUS_CHANNEL*)context;
+	struct vmbus_channel *channel = context;
 
 	DPRINT_ENTER(VMBUS);
 
@@ -335,7 +335,7 @@
 	)
 {
 	VMBUS_CHANNEL_OFFER_CHANNEL* offer = (VMBUS_CHANNEL_OFFER_CHANNEL*)hdr;
-	VMBUS_CHANNEL* newChannel;
+	struct vmbus_channel *newChannel;
 
 	GUID *guidType;
 	GUID *guidInstance;
@@ -411,7 +411,7 @@
 	)
 {
 	VMBUS_CHANNEL_RESCIND_OFFER* rescind = (VMBUS_CHANNEL_RESCIND_OFFER*)hdr;
-	VMBUS_CHANNEL* channel;
+	struct vmbus_channel *channel;
 
 	DPRINT_ENTER(VMBUS);
 
@@ -469,7 +469,7 @@
 	VMBUS_CHANNEL_OPEN_RESULT* result = (VMBUS_CHANNEL_OPEN_RESULT*)hdr;
 	LIST_ENTRY* anchor;
 	LIST_ENTRY* curr;
-	VMBUS_CHANNEL_MSGINFO* msgInfo;
+	struct vmbus_channel_msginfo *msgInfo;
 	VMBUS_CHANNEL_MESSAGE_HEADER* requestHeader;
 	VMBUS_CHANNEL_OPEN_CHANNEL* openMsg;
 	unsigned long flags;
@@ -483,7 +483,7 @@
 
 	ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelMsgList)
 	{
-		msgInfo = (VMBUS_CHANNEL_MSGINFO*) curr;
+		msgInfo = (struct vmbus_channel_msginfo *)curr;
 		requestHeader = (VMBUS_CHANNEL_MESSAGE_HEADER*)msgInfo->Msg;
 
 		if (requestHeader->MessageType == ChannelMessageOpenChannel)
@@ -523,7 +523,7 @@
 	VMBUS_CHANNEL_GPADL_CREATED *gpadlCreated = (VMBUS_CHANNEL_GPADL_CREATED*)hdr;
 	LIST_ENTRY *anchor;
 	LIST_ENTRY *curr;
-	VMBUS_CHANNEL_MSGINFO *msgInfo;
+	struct vmbus_channel_msginfo *msgInfo;
 	VMBUS_CHANNEL_MESSAGE_HEADER *requestHeader;
 	VMBUS_CHANNEL_GPADL_HEADER *gpadlHeader;
 	unsigned long flags;
@@ -537,7 +537,7 @@
 
 	ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelMsgList)
 	{
-		msgInfo = (VMBUS_CHANNEL_MSGINFO*) curr;
+		msgInfo = (struct vmbus_channel_msginfo *)curr;
 		requestHeader = (VMBUS_CHANNEL_MESSAGE_HEADER*)msgInfo->Msg;
 
 		if (requestHeader->MessageType == ChannelMessageGpadlHeader)
@@ -578,7 +578,7 @@
 	VMBUS_CHANNEL_GPADL_TORNDOWN* gpadlTorndown  = (VMBUS_CHANNEL_GPADL_TORNDOWN*)hdr;
 	LIST_ENTRY* anchor;
 	LIST_ENTRY* curr;
-	VMBUS_CHANNEL_MSGINFO* msgInfo;
+	struct vmbus_channel_msginfo *msgInfo;
 	VMBUS_CHANNEL_MESSAGE_HEADER *requestHeader;
 	VMBUS_CHANNEL_GPADL_TEARDOWN *gpadlTeardown;
 	unsigned long flags;
@@ -590,7 +590,7 @@
 
 	ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelMsgList)
 	{
-		msgInfo = (VMBUS_CHANNEL_MSGINFO*) curr;
+		msgInfo = (struct vmbus_channel_msginfo *)curr;
 		requestHeader = (VMBUS_CHANNEL_MESSAGE_HEADER*)msgInfo->Msg;
 
 		if (requestHeader->MessageType == ChannelMessageGpadlTeardown)
@@ -629,7 +629,7 @@
 {
 	LIST_ENTRY* anchor;
 	LIST_ENTRY* curr;
-	VMBUS_CHANNEL_MSGINFO *msgInfo;
+	struct vmbus_channel_msginfo *msgInfo;
 	VMBUS_CHANNEL_MESSAGE_HEADER *requestHeader;
 	VMBUS_CHANNEL_INITIATE_CONTACT *initiate;
 	VMBUS_CHANNEL_VERSION_RESPONSE *versionResponse  = (VMBUS_CHANNEL_VERSION_RESPONSE*)hdr;
@@ -641,7 +641,7 @@
 
 	ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelMsgList)
 	{
-		msgInfo = (VMBUS_CHANNEL_MSGINFO*) curr;
+		msgInfo = (struct vmbus_channel_msginfo *)curr;
 		requestHeader = (VMBUS_CHANNEL_MESSAGE_HEADER*)msgInfo->Msg;
 
 		if (requestHeader->MessageType == ChannelMessageInitiateContact)
@@ -717,11 +717,11 @@
 {
 	int ret=0;
 	VMBUS_CHANNEL_MESSAGE_HEADER* msg;
-	VMBUS_CHANNEL_MSGINFO* msgInfo;
+	struct vmbus_channel_msginfo *msgInfo;
 
 	DPRINT_ENTER(VMBUS);
 
-	msgInfo = kmalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_MESSAGE_HEADER), GFP_KERNEL);
+	msgInfo = kmalloc(sizeof(*msgInfo) + sizeof(VMBUS_CHANNEL_MESSAGE_HEADER), GFP_KERNEL);
 	ASSERT(msgInfo != NULL);
 
 	msgInfo->WaitEvent = osd_WaitEventCreate();
@@ -775,8 +775,8 @@
 void VmbusChannelReleaseUnattachedChannels(void)
 {
 	LIST_ENTRY *entry;
-	VMBUS_CHANNEL *channel;
-	VMBUS_CHANNEL *start=NULL;
+	struct vmbus_channel *channel;
+	struct vmbus_channel *start = NULL;
 	unsigned long flags;
 
 	spin_lock_irqsave(&gVmbusConnection.channel_lock, flags);
@@ -784,7 +784,7 @@
 	while (!IsListEmpty(&gVmbusConnection.ChannelList))
 	{
 		entry = TOP_LIST_ENTRY(&gVmbusConnection.ChannelList);
-		channel = CONTAINING_RECORD(entry, VMBUS_CHANNEL, ListEntry);
+		channel = CONTAINING_RECORD(entry, struct vmbus_channel, ListEntry);
 
 		if (channel == start)
 			break;
diff --git a/drivers/staging/hv/ChannelMgmt.h b/drivers/staging/hv/ChannelMgmt.h
index 6a7bc4c..8b81d59 100644
--- a/drivers/staging/hv/ChannelMgmt.h
+++ b/drivers/staging/hv/ChannelMgmt.h
@@ -36,20 +36,20 @@
 
 typedef void (*PFN_CHANNEL_CALLBACK)(void *context);
 
-typedef enum {
+enum vmbus_channel_state {
 	CHANNEL_OFFER_STATE,
 	CHANNEL_OPENING_STATE,
 	CHANNEL_OPEN_STATE,
-} VMBUS_CHANNEL_STATE;
+};
 
-typedef struct _VMBUS_CHANNEL {
+struct vmbus_channel {
 	LIST_ENTRY ListEntry;
 
 	struct hv_device *DeviceObject;
 
 	struct timer_list poll_timer; /* SA-111 workaround */
 
-	VMBUS_CHANNEL_STATE State;
+	enum vmbus_channel_state State;
 
 	VMBUS_CHANNEL_OFFER_CHANNEL OfferMsg;
 	/*
@@ -74,12 +74,11 @@
 
 	PFN_CHANNEL_CALLBACK OnChannelCallback;
 	void *ChannelCallbackContext;
-} VMBUS_CHANNEL;
+};
 
-
-typedef struct _VMBUS_CHANNEL_DEBUG_INFO {
+struct vmbus_channel_debug_info {
 	u32 RelId;
-	VMBUS_CHANNEL_STATE State;
+	enum vmbus_channel_state State;
 	GUID InterfaceType;
 	GUID InterfaceInstance;
 	u32 MonitorId;
@@ -92,23 +91,13 @@
 
 	RING_BUFFER_DEBUG_INFO Inbound;
 	RING_BUFFER_DEBUG_INFO Outbound;
-} VMBUS_CHANNEL_DEBUG_INFO;
-
-
-typedef union {
-	VMBUS_CHANNEL_VERSION_SUPPORTED VersionSupported;
-	VMBUS_CHANNEL_OPEN_RESULT OpenResult;
-	VMBUS_CHANNEL_GPADL_TORNDOWN GpadlTorndown;
-	VMBUS_CHANNEL_GPADL_CREATED GpadlCreated;
-	VMBUS_CHANNEL_VERSION_RESPONSE VersionResponse;
-} VMBUS_CHANNEL_MESSAGE_RESPONSE;
-
+};
 
 /*
  * Represents each channel msg on the vmbus connection This is a
  * variable-size data structure depending on the msg type itself
  */
-typedef struct _VMBUS_CHANNEL_MSGINFO {
+struct vmbus_channel_msginfo {
 	/* Bookkeeping stuff */
 	LIST_ENTRY MsgListEntry;
 
@@ -118,7 +107,13 @@
 	/* Synchronize the request/response if needed */
 	struct osd_waitevent *WaitEvent;
 
-	VMBUS_CHANNEL_MESSAGE_RESPONSE Response;
+	union {
+		VMBUS_CHANNEL_VERSION_SUPPORTED VersionSupported;
+		VMBUS_CHANNEL_OPEN_RESULT OpenResult;
+		VMBUS_CHANNEL_GPADL_TORNDOWN GpadlTorndown;
+		VMBUS_CHANNEL_GPADL_CREATED GpadlCreated;
+		VMBUS_CHANNEL_VERSION_RESPONSE VersionResponse;
+	} Response;
 
 	u32 MessageSize;
 	/*
@@ -126,12 +121,12 @@
 	 * It will contain at minimum the VMBUS_CHANNEL_MESSAGE_HEADER header
 	 */
 	unsigned char Msg[0];
-} VMBUS_CHANNEL_MSGINFO;
+};
 
 
-VMBUS_CHANNEL *AllocVmbusChannel(void);
+struct vmbus_channel *AllocVmbusChannel(void);
 
-void FreeVmbusChannel(VMBUS_CHANNEL *Channel);
+void FreeVmbusChannel(struct vmbus_channel *Channel);
 
 void VmbusOnChannelMessage(void *Context);
 
diff --git a/drivers/staging/hv/Connection.c b/drivers/staging/hv/Connection.c
index 01aa669..6b72689 100644
--- a/drivers/staging/hv/Connection.c
+++ b/drivers/staging/hv/Connection.c
@@ -49,7 +49,7 @@
 int VmbusConnect(void)
 {
 	int ret=0;
-	VMBUS_CHANNEL_MSGINFO *msgInfo=NULL;
+	struct vmbus_channel_msginfo *msgInfo = NULL;
 	VMBUS_CHANNEL_INITIATE_CONTACT *msg;
 	unsigned long flags;
 
@@ -99,7 +99,7 @@
 		goto Cleanup;
 	}
 
-	msgInfo = kzalloc(sizeof(VMBUS_CHANNEL_MSGINFO) + sizeof(VMBUS_CHANNEL_INITIATE_CONTACT), GFP_KERNEL);
+	msgInfo = kzalloc(sizeof(*msgInfo) + sizeof(VMBUS_CHANNEL_INITIATE_CONTACT), GFP_KERNEL);
 	if (msgInfo == NULL)
 	{
 		ret = -1;
@@ -257,10 +257,10 @@
 	Get the channel object given its child relative id (ie channel id)
 
 --*/
-VMBUS_CHANNEL *GetChannelFromRelId(u32 relId)
+struct vmbus_channel *GetChannelFromRelId(u32 relId)
 {
-	VMBUS_CHANNEL* channel;
-	VMBUS_CHANNEL* foundChannel=NULL;
+	struct vmbus_channel *channel;
+	struct vmbus_channel *foundChannel  = NULL;
 	LIST_ENTRY* anchor;
 	LIST_ENTRY* curr;
 	unsigned long flags;
@@ -268,7 +268,7 @@
 	spin_lock_irqsave(&gVmbusConnection.channel_lock, flags);
 	ITERATE_LIST_ENTRIES(anchor, curr, &gVmbusConnection.ChannelList)
 	{
-		channel = CONTAINING_RECORD(curr, VMBUS_CHANNEL, ListEntry);
+		channel = CONTAINING_RECORD(curr, struct vmbus_channel, ListEntry);
 
 		if (channel->OfferMsg.ChildRelId == relId)
 		{
@@ -297,7 +297,7 @@
 	void * context
 	)
 {
-	VMBUS_CHANNEL* channel;
+	struct vmbus_channel *channel;
 	u32 relId = (u32)(unsigned long)context;
 
 	ASSERT(relId > 0);
diff --git a/drivers/staging/hv/VmbusPrivate.h b/drivers/staging/hv/VmbusPrivate.h
index 6b28418..81e28f4 100644
--- a/drivers/staging/hv/VmbusPrivate.h
+++ b/drivers/staging/hv/VmbusPrivate.h
@@ -115,7 +115,7 @@
 /* VmbusChildDeviceDestroy( */
 /* struct hv_device *); */
 
-VMBUS_CHANNEL *GetChannelFromRelId(u32 relId);
+struct vmbus_channel *GetChannelFromRelId(u32 relId);
 
 
 /* Connection interface */