Staging: hv: vmbus_drv: Get rid of util synchronixation based on channel counting

Now that we have dealt with this issue differently, get rid of the
old mechanism.

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>
diff --git a/drivers/staging/hv/channel_mgmt.c b/drivers/staging/hv/channel_mgmt.c
index b7343bc..957d61e 100644
--- a/drivers/staging/hv/channel_mgmt.c
+++ b/drivers/staging/hv/channel_mgmt.c
@@ -327,22 +327,6 @@
 }
 
 
-DECLARE_COMPLETION(hv_channel_ready);
-
-/*
- * Count initialized channels, and ensure all channels are ready when hv_vmbus
- * module loading completes.
- */
-static void count_hv_channel(void)
-{
-	static int counter;
-	unsigned long flags;
-
-	spin_lock_irqsave(&vmbus_connection.channel_lock, flags);
-	if (++counter == MAX_MSG_TYPES)
-		complete(&hv_channel_ready);
-	spin_unlock_irqrestore(&vmbus_connection.channel_lock, flags);
-}
 
 /*
  * vmbus_process_rescind_offer -
@@ -449,7 +433,6 @@
 
 				pr_info("%s\n", hv_cb_utils[cnt].log_msg);
 
-				count_hv_channel();
 			}
 		}
 	}
diff --git a/drivers/staging/hv/hyperv.h b/drivers/staging/hv/hyperv.h
index 8b826a1..3310e9b 100644
--- a/drivers/staging/hv/hyperv.h
+++ b/drivers/staging/hv/hyperv.h
@@ -844,8 +844,6 @@
 int vmbus_child_driver_register(struct device_driver *drv);
 void vmbus_child_driver_unregister(struct device_driver *drv);
 
-extern struct completion hv_channel_ready;
-
 /*
  * Common header for Hyper-V ICs
  */
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index e553fc9..ec1d38c 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -582,7 +582,6 @@
 
 
 	vmbus_request_offers();
-	wait_for_completion(&hv_channel_ready);
 
 cleanup:
 	return ret;