Staging: hv: vmbus: Get rid of an unused function in connection.c
authorK. Y. Srinivasan <kys@microsoft.com>
Mon, 6 Jun 2011 22:50:01 +0000 (15:50 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 7 Jun 2011 20:46:01 +0000 (13:46 -0700)
Get rid of an unused function in connection.c

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/connection.c
drivers/staging/hv/hyperv_vmbus.h

index fc93bdfdd0bd9059558ce95418ca63eb50f97fdb..7d7f1d5d5a3d82cf86867eb5d3a69bf26ba9d67e 100644 (file)
@@ -185,44 +185,6 @@ cleanup:
        return ret;
 }
 
-/*
- * vmbus_disconnect -
- * Sends a disconnect request on the partition service connection
- */
-int vmbus_disconnect(void)
-{
-       int ret = 0;
-       struct vmbus_channel_message_header *msg;
-
-       /* Make sure we are connected */
-       if (vmbus_connection.conn_state != CONNECTED)
-               return -1;
-
-       msg = kzalloc(sizeof(struct vmbus_channel_message_header), GFP_KERNEL);
-       if (!msg)
-               return -ENOMEM;
-
-       msg->msgtype = CHANNELMSG_UNLOAD;
-
-       ret = vmbus_post_msg(msg,
-                              sizeof(struct vmbus_channel_message_header));
-       if (ret != 0)
-               goto cleanup;
-
-       free_pages((unsigned long)vmbus_connection.int_page, 0);
-       free_pages((unsigned long)vmbus_connection.monitor_pages, 1);
-
-       /* TODO: iterate thru the msg list and free up */
-       destroy_workqueue(vmbus_connection.work_queue);
-
-       vmbus_connection.conn_state = DISCONNECTED;
-
-       pr_info("hv_vmbus disconnected\n");
-
-cleanup:
-       kfree(msg);
-       return ret;
-}
 
 /*
  * relid2channel - Get the channel object given its
index bf30a425b6432f0e2d81b4257a3bf2a989a0548c..349ad80ce32846c72f3b57c64ff824d01be794d5 100644 (file)
@@ -619,8 +619,6 @@ struct vmbus_channel *relid2channel(u32 relid);
 
 int vmbus_connect(void);
 
-int vmbus_disconnect(void);
-
 int vmbus_post_msg(void *buffer, size_t buflen);
 
 int vmbus_set_event(u32 child_relid);