]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: hv: vmbus_drv: Get rid of util synchronixation based on channel counting
authorK. Y. Srinivasan <kys@microsoft.com>
Mon, 16 May 2011 13:44:37 +0000 (06:44 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 17 May 2011 20:36:50 +0000 (13:36 -0700)
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>
drivers/staging/hv/channel_mgmt.c
drivers/staging/hv/hyperv.h
drivers/staging/hv/vmbus_drv.c

index b7343bc72b40cdb7fce24211f9aaa61ed2f4e702..957d61ee4cebe2f2f9b02edd84c077fe1491b738 100644 (file)
@@ -327,22 +327,6 @@ void free_channel(struct vmbus_channel *channel)
 }
 
 
-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 @@ static void vmbus_process_offer(struct work_struct *work)
 
                                pr_info("%s\n", hv_cb_utils[cnt].log_msg);
 
-                               count_hv_channel();
                        }
                }
        }
index 8b826a115443684d22930c60a0480a79c382fefa..3310e9bdf562bc35ded6141f3f9266572ac72040 100644 (file)
@@ -844,8 +844,6 @@ static inline struct hv_driver *drv_to_hv_drv(struct device_driver *d)
 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
  */
index e553fc97749530ab452c302568a293e5b125b2cb..ec1d38cd481c74a8eec2e9df608762d4417b33bb 100644 (file)
@@ -582,7 +582,6 @@ static int vmbus_bus_init(struct pci_dev *pdev)
 
 
        vmbus_request_offers();
-       wait_for_completion(&hv_channel_ready);
 
 cleanup:
        return ret;