Staging: hv: Get rid of vmbus_release_unattached_channels() as it is not used
authorK. Y. Srinivasan <kys@microsoft.com>
Fri, 29 Apr 2011 20:45:00 +0000 (13:45 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 3 May 2011 20:31:25 +0000 (13:31 -0700)
Since vmbus_release_unattached_channels() is only used in module
unload path and since the vmbus driver cannot be unloaded,
get rid of this "dead" code.

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: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/channel_mgmt.c
drivers/staging/hv/channel_mgmt.h

index fe32f7e3e0812577c1ac356e46ddc3c9c1fc49e9..1929ab3c09f8908d0415be1022b1408fd76e334f 100644 (file)
@@ -791,37 +791,4 @@ cleanup:
        return ret;
 }
 
-/*
- * vmbus_release_unattached_channels - Release channels that are
- * unattached/unconnected ie (no drivers associated)
- */
-void vmbus_release_unattached_channels(void)
-{
-       struct vmbus_channel *channel, *pos;
-       struct vmbus_channel *start = NULL;
-       unsigned long flags;
-
-       spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
-
-       list_for_each_entry_safe(channel, pos, &vmbus_connection.chn_list,
-                                listentry) {
-               if (channel == start)
-                       break;
-
-               if (!channel->device_obj->drv) {
-                       list_del(&channel->listentry);
-
-                       pr_err("Releasing unattached device object\n");
-
-                       vmbus_child_device_unregister(channel->device_obj);
-                       free_channel(channel);
-               } else {
-                       if (!start)
-                               start = channel;
-               }
-       }
-
-       spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags);
-}
-
 /* eof */
index 96f74e2a3c7f00c84a302a05c5b2559646920ad3..3b2c39317bab6e7173c0005447add99fb6ed9675 100644 (file)
@@ -315,6 +315,4 @@ void vmbus_onmessage(void *context);
 
 int vmbus_request_offers(void);
 
-void vmbus_release_unattached_channels(void);
-
 #endif /* _CHANNEL_MGMT_H_ */