aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/channel_interface.c
diff options
context:
space:
mode:
authorHaiyang Zhang <haiyangz@microsoft.com>2010-09-08 16:29:45 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2010-09-14 19:27:12 -0400
commit9e795a5232e1888d46e22e05677d280a1056ceea (patch)
tree72ef59bde440e15a514158513f35fdbdc389bfab /drivers/staging/hv/channel_interface.c
parent5fee254098c11a52ce04e1efdc8c090caf592bfd (diff)
staging: hv: Convert vmbus driver interface function pointer table to constant
Convert vmbus driver interface function pointer table to constant The vmbus interface functions are assigned to a constant - vmbus_ops. Because the vmbus interface function pointer table is converted to a constant variable -- vmbus_ops, the function GetChannelInterface(), VmbusGetChannelInterface() and pointer GetChannelInterface are no longer in use. The deprecated function's work is done by the initialization of the newly added constant variable vmbus_ops. I created the new constant variable vmbus_ops and removed the deprecated function pointer GetChannelInterface in one patch. Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv/channel_interface.c')
-rw-r--r--drivers/staging/hv/channel_interface.c29
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/staging/hv/channel_interface.c b/drivers/staging/hv/channel_interface.c
index d9f51ac75ea..3f6a1cb9cd8 100644
--- a/drivers/staging/hv/channel_interface.c
+++ b/drivers/staging/hv/channel_interface.c
@@ -97,20 +97,6 @@ static int IVmbusChannelTeardownGpadl(struct hv_device *device, u32 GpadlHandle)
97 97
98} 98}
99 99
100void GetChannelInterface(struct vmbus_channel_interface *iface)
101{
102 iface->Open = IVmbusChannelOpen;
103 iface->Close = IVmbusChannelClose;
104 iface->SendPacket = IVmbusChannelSendPacket;
105 iface->SendPacketPageBuffer = IVmbusChannelSendPacketPageBuffer;
106 iface->SendPacketMultiPageBuffer =
107 IVmbusChannelSendPacketMultiPageBuffer;
108 iface->RecvPacket = IVmbusChannelRecvPacket;
109 iface->RecvPacketRaw = IVmbusChannelRecvPacketRaw;
110 iface->EstablishGpadl = IVmbusChannelEstablishGpadl;
111 iface->TeardownGpadl = IVmbusChannelTeardownGpadl;
112 iface->GetInfo = GetChannelInfo;
113}
114 100
115void GetChannelInfo(struct hv_device *device, struct hv_device_info *info) 101void GetChannelInfo(struct hv_device *device, struct hv_device_info *info)
116{ 102{
@@ -150,3 +136,18 @@ void GetChannelInfo(struct hv_device *device, struct hv_device_info *info)
150 info->Outbound.BytesAvailToRead = debugInfo.Outbound.BytesAvailToRead; 136 info->Outbound.BytesAvailToRead = debugInfo.Outbound.BytesAvailToRead;
151 info->Outbound.BytesAvailToWrite = debugInfo.Outbound.BytesAvailToWrite; 137 info->Outbound.BytesAvailToWrite = debugInfo.Outbound.BytesAvailToWrite;
152} 138}
139
140
141/* vmbus interface function pointer table */
142const struct vmbus_channel_interface vmbus_ops = {
143 .Open = IVmbusChannelOpen,
144 .Close = IVmbusChannelClose,
145 .SendPacket = IVmbusChannelSendPacket,
146 .SendPacketPageBuffer = IVmbusChannelSendPacketPageBuffer,
147 .SendPacketMultiPageBuffer = IVmbusChannelSendPacketMultiPageBuffer,
148 .RecvPacket = IVmbusChannelRecvPacket,
149 .RecvPacketRaw = IVmbusChannelRecvPacketRaw,
150 .EstablishGpadl = IVmbusChannelEstablishGpadl,
151 .TeardownGpadl = IVmbusChannelTeardownGpadl,
152 .GetInfo = GetChannelInfo,
153};