diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-08-20 12:17:36 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:01:58 -0700 |
commit | ee3d7ddfe54108e2e1e3259fb62ec085404c3a74 (patch) | |
tree | c4777e10194096f411a98908aa2cf90e4d1f2c7a /drivers | |
parent | 54b2b847f522eb2c015455bd592a7214972f4d6c (diff) | |
download | linux-3.10-ee3d7ddfe54108e2e1e3259fb62ec085404c3a74.tar.gz linux-3.10-ee3d7ddfe54108e2e1e3259fb62ec085404c3a74.tar.bz2 linux-3.10-ee3d7ddfe54108e2e1e3259fb62ec085404c3a74.zip |
Staging: hv: typedef removal for VmbusApi.h
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>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/staging/hv/Channel.c | 6 | ||||
-rw-r--r-- | drivers/staging/hv/Channel.h | 8 | ||||
-rw-r--r-- | drivers/staging/hv/ChannelInterface.c | 8 | ||||
-rw-r--r-- | drivers/staging/hv/ChannelInterface.h | 4 | ||||
-rw-r--r-- | drivers/staging/hv/NetVsc.c | 2 | ||||
-rw-r--r-- | drivers/staging/hv/RndisFilter.c | 2 | ||||
-rw-r--r-- | drivers/staging/hv/Vmbus.c | 32 | ||||
-rw-r--r-- | drivers/staging/hv/include/NetVscApi.h | 2 | ||||
-rw-r--r-- | drivers/staging/hv/include/StorVscApi.h | 2 | ||||
-rw-r--r-- | drivers/staging/hv/include/VmbusApi.h | 55 | ||||
-rw-r--r-- | drivers/staging/hv/netvsc_drv.c | 4 | ||||
-rw-r--r-- | drivers/staging/hv/vmbus.h | 2 | ||||
-rw-r--r-- | drivers/staging/hv/vmbus_drv.c | 28 |
13 files changed, 75 insertions, 80 deletions
diff --git a/drivers/staging/hv/Channel.c b/drivers/staging/hv/Channel.c index f8607320de4..5bea2d6bff9 100644 --- a/drivers/staging/hv/Channel.c +++ b/drivers/staging/hv/Channel.c @@ -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 diff --git a/drivers/staging/hv/Channel.h b/drivers/staging/hv/Channel.h index d0fd9aa6238..7fde5cb2385 100644 --- a/drivers/staging/hv/Channel.h +++ b/drivers/staging/hv/Channel.h @@ -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); diff --git a/drivers/staging/hv/ChannelInterface.c b/drivers/staging/hv/ChannelInterface.c index 0d6bef16c74..3463ea3640e 100644 --- a/drivers/staging/hv/ChannelInterface.c +++ b/drivers/staging/hv/ChannelInterface.c @@ -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; diff --git a/drivers/staging/hv/ChannelInterface.h b/drivers/staging/hv/ChannelInterface.h index 49a7c7d1c1c..e24f7365ede 100644 --- a/drivers/staging/hv/ChannelInterface.h +++ b/drivers/staging/hv/ChannelInterface.h @@ -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_ */ diff --git a/drivers/staging/hv/NetVsc.c b/drivers/staging/hv/NetVsc.c index 4594277f555..6d5ee1cd6b2 100644 --- a/drivers/staging/hv/NetVsc.c +++ b/drivers/staging/hv/NetVsc.c @@ -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); diff --git a/drivers/staging/hv/RndisFilter.c b/drivers/staging/hv/RndisFilter.c index 36c6afdb817..e6fef5fb86b 100644 --- a/drivers/staging/hv/RndisFilter.c +++ b/drivers/staging/hv/RndisFilter.c @@ -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; diff --git a/drivers/staging/hv/Vmbus.c b/drivers/staging/hv/Vmbus.c index e39cea1434a..b3004cb9b6c 100644 --- a/drivers/staging/hv/Vmbus.c +++ b/drivers/staging/hv/Vmbus.c @@ -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; */ diff --git a/drivers/staging/hv/include/NetVscApi.h b/drivers/staging/hv/include/NetVscApi.h index f83c6fc8ed1..60e6fbbca66 100644 --- a/drivers/staging/hv/include/NetVscApi.h +++ b/drivers/staging/hv/include/NetVscApi.h @@ -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]; }; diff --git a/drivers/staging/hv/include/StorVscApi.h b/drivers/staging/hv/include/StorVscApi.h index 5d72f299743..2b3a73704af 100644 --- a/drivers/staging/hv/include/StorVscApi.h +++ b/drivers/staging/hv/include/StorVscApi.h @@ -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; }; diff --git a/drivers/staging/hv/include/VmbusApi.h b/drivers/staging/hv/include/VmbusApi.h index 8b0b23350a2..68a6dae4d28 100644 --- a/drivers/staging/hv/include/VmbusApi.h +++ b/drivers/staging/hv/include/VmbusApi.h @@ -31,25 +31,26 @@ #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); diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 9ea61b281ef..bd11853b5c8 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -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; diff --git a/drivers/staging/hv/vmbus.h b/drivers/staging/hv/vmbus.h index 733edc9ab10..d47b291bbe6 100644 --- a/drivers/staging/hv/vmbus.h +++ b/drivers/staging/hv/vmbus.h @@ -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_ */ diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index 1700dd3be81..7d635310669 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -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); |