aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2010-12-02 11:50:58 -0500
committerGreg Kroah-Hartman <gregkh@suse.de>2010-12-02 11:50:58 -0500
commit2d6e882bada0ca7828347647c5b1091bf5f18fee (patch)
treeb169dbf406b0dfbcf88350e11f0d0a8ffe4aee10 /drivers/staging
parentc722bd3e2cb92be7afec346894faa29605436c1a (diff)
Staging: hv: remove GetChannelOffers vmbus_driver callback
It's only ever set to one function, so just call that function instead. Actually, that wrapper function only ever called vmbus_request_offers() so just call that function instead, no need for a do-nothing intermediate step here. Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/hv/vmbus.c9
-rw-r--r--drivers/staging/hv/vmbus_api.h3
-rw-r--r--drivers/staging/hv/vmbus_drv.c7
3 files changed, 2 insertions, 17 deletions
diff --git a/drivers/staging/hv/vmbus.c b/drivers/staging/hv/vmbus.c
index 3aeedf6026e..ae9e298f5c8 100644
--- a/drivers/staging/hv/vmbus.c
+++ b/drivers/staging/hv/vmbus.c
@@ -53,14 +53,6 @@ static struct hv_driver *gDriver; /* vmbus driver object */
53static struct hv_device *gDevice; /* vmbus root device */ 53static struct hv_device *gDevice; /* vmbus root device */
54 54
55/* 55/*
56 * VmbusGetChannelOffers - Retrieve the channel offers from the parent partition
57 */
58static void VmbusGetChannelOffers(void)
59{
60 vmbus_request_offers();
61}
62
63/*
64 * VmbusChildDeviceAdd - Registers the child device with the vmbus 56 * VmbusChildDeviceAdd - Registers the child device with the vmbus
65 */ 57 */
66int VmbusChildDeviceAdd(struct hv_device *ChildDevice) 58int VmbusChildDeviceAdd(struct hv_device *ChildDevice)
@@ -235,7 +227,6 @@ int VmbusInitialize(struct hv_driver *drv)
235 driver->Base.OnDeviceAdd = VmbusOnDeviceAdd; 227 driver->Base.OnDeviceAdd = VmbusOnDeviceAdd;
236 driver->Base.OnDeviceRemove = VmbusOnDeviceRemove; 228 driver->Base.OnDeviceRemove = VmbusOnDeviceRemove;
237 driver->Base.OnCleanup = VmbusOnCleanup; 229 driver->Base.OnCleanup = VmbusOnCleanup;
238 driver->GetChannelOffers = VmbusGetChannelOffers;
239 230
240 /* Hypervisor initialization...setup hypercall page..etc */ 231 /* Hypervisor initialization...setup hypercall page..etc */
241 ret = hv_init(); 232 ret = hv_init();
diff --git a/drivers/staging/hv/vmbus_api.h b/drivers/staging/hv/vmbus_api.h
index 31549c9579b..c85d7d43146 100644
--- a/drivers/staging/hv/vmbus_api.h
+++ b/drivers/staging/hv/vmbus_api.h
@@ -124,9 +124,6 @@ struct vmbus_driver {
124 /* Set by the caller */ 124 /* Set by the caller */
125 int (*OnChildDeviceAdd)(struct hv_device *RootDevice, 125 int (*OnChildDeviceAdd)(struct hv_device *RootDevice,
126 struct hv_device *ChildDevice); 126 struct hv_device *ChildDevice);
127
128 /* Set by the callee */
129 void (*GetChannelOffers)(void);
130}; 127};
131 128
132int VmbusInitialize(struct hv_driver *drv); 129int VmbusInitialize(struct hv_driver *drv);
diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c
index d075d962427..6de53c40e02 100644
--- a/drivers/staging/hv/vmbus_drv.c
+++ b/drivers/staging/hv/vmbus_drv.c
@@ -387,9 +387,7 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv))
387 goto cleanup; 387 goto cleanup;
388 } 388 }
389 389
390 390 vmbus_request_offers();
391 vmbus_drv_obj->GetChannelOffers();
392
393 wait_for_completion(&hv_channel_ready); 391 wait_for_completion(&hv_channel_ready);
394 392
395cleanup: 393cleanup:
@@ -441,7 +439,6 @@ static void vmbus_bus_exit(void)
441 */ 439 */
442int vmbus_child_driver_register(struct driver_context *driver_ctx) 440int vmbus_child_driver_register(struct driver_context *driver_ctx)
443{ 441{
444 struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
445 int ret; 442 int ret;
446 443
447 DPRINT_INFO(VMBUS_DRV, "child driver (%p) registering - name %s", 444 DPRINT_INFO(VMBUS_DRV, "child driver (%p) registering - name %s",
@@ -452,7 +449,7 @@ int vmbus_child_driver_register(struct driver_context *driver_ctx)
452 449
453 ret = driver_register(&driver_ctx->driver); 450 ret = driver_register(&driver_ctx->driver);
454 451
455 vmbus_drv_obj->GetChannelOffers(); 452 vmbus_request_offers();
456 453
457 return ret; 454 return ret;
458} 455}