aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hv/channel_mgmt.c
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2011-12-12 12:29:17 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2011-12-12 17:26:50 -0500
commit93e5bd06a95343c701361fa009cdc5a653d6ec8e (patch)
treefe28f7a5ad3c009fbf8e197c94c74b444015630f /drivers/hv/channel_mgmt.c
parent8b8ee6753154dd6cfe397e0d29fe7f90a8adb50b (diff)
Drivers: hv: Make the vmbus driver unloadable
It turns out that the vmbus driver can be made unloadable. Make it unloadable. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/hv/channel_mgmt.c')
-rw-r--r--drivers/hv/channel_mgmt.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/hv/channel_mgmt.c b/drivers/hv/channel_mgmt.c
index b91af50875e9..36484db36baf 100644
--- a/drivers/hv/channel_mgmt.c
+++ b/drivers/hv/channel_mgmt.c
@@ -223,6 +223,17 @@ static void vmbus_process_rescind_offer(struct work_struct *work)
223 vmbus_device_unregister(channel->device_obj); 223 vmbus_device_unregister(channel->device_obj);
224} 224}
225 225
226void vmbus_free_channels(void)
227{
228 struct vmbus_channel *channel;
229
230 list_for_each_entry(channel, &vmbus_connection.chn_list, listentry) {
231 vmbus_device_unregister(channel->device_obj);
232 kfree(channel->device_obj);
233 free_channel(channel);
234 }
235}
236
226/* 237/*
227 * vmbus_process_offer - Process the offer by creating a channel/device 238 * vmbus_process_offer - Process the offer by creating a channel/device
228 * associated with this offer 239 * associated with this offer