aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/hv/channel_interface.c
diff options
context:
space:
mode:
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};