Commit 2d6e882b authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman

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: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent c722bd3e
...@@ -52,14 +52,6 @@ static const struct hv_guid gVmbusDeviceId = { ...@@ -52,14 +52,6 @@ static const struct hv_guid gVmbusDeviceId = {
static struct hv_driver *gDriver; /* vmbus driver object */ static struct hv_driver *gDriver; /* vmbus driver object */
static struct hv_device *gDevice; /* vmbus root device */ static struct hv_device *gDevice; /* vmbus root device */
/*
* VmbusGetChannelOffers - Retrieve the channel offers from the parent partition
*/
static void VmbusGetChannelOffers(void)
{
vmbus_request_offers();
}
/* /*
* VmbusChildDeviceAdd - Registers the child device with the vmbus * VmbusChildDeviceAdd - Registers the child device with the vmbus
*/ */
...@@ -235,7 +227,6 @@ int VmbusInitialize(struct hv_driver *drv) ...@@ -235,7 +227,6 @@ int VmbusInitialize(struct hv_driver *drv)
driver->Base.OnDeviceAdd = VmbusOnDeviceAdd; driver->Base.OnDeviceAdd = VmbusOnDeviceAdd;
driver->Base.OnDeviceRemove = VmbusOnDeviceRemove; driver->Base.OnDeviceRemove = VmbusOnDeviceRemove;
driver->Base.OnCleanup = VmbusOnCleanup; driver->Base.OnCleanup = VmbusOnCleanup;
driver->GetChannelOffers = VmbusGetChannelOffers;
/* Hypervisor initialization...setup hypercall page..etc */ /* Hypervisor initialization...setup hypercall page..etc */
ret = hv_init(); ret = hv_init();
......
...@@ -124,9 +124,6 @@ struct vmbus_driver { ...@@ -124,9 +124,6 @@ struct vmbus_driver {
/* Set by the caller */ /* Set by the caller */
int (*OnChildDeviceAdd)(struct hv_device *RootDevice, int (*OnChildDeviceAdd)(struct hv_device *RootDevice,
struct hv_device *ChildDevice); struct hv_device *ChildDevice);
/* Set by the callee */
void (*GetChannelOffers)(void);
}; };
int VmbusInitialize(struct hv_driver *drv); int VmbusInitialize(struct hv_driver *drv);
......
...@@ -387,9 +387,7 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv)) ...@@ -387,9 +387,7 @@ static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv))
goto cleanup; goto cleanup;
} }
vmbus_request_offers();
vmbus_drv_obj->GetChannelOffers();
wait_for_completion(&hv_channel_ready); wait_for_completion(&hv_channel_ready);
cleanup: cleanup:
...@@ -441,7 +439,6 @@ static void vmbus_bus_exit(void) ...@@ -441,7 +439,6 @@ static void vmbus_bus_exit(void)
*/ */
int vmbus_child_driver_register(struct driver_context *driver_ctx) int vmbus_child_driver_register(struct driver_context *driver_ctx)
{ {
struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
int ret; int ret;
DPRINT_INFO(VMBUS_DRV, "child driver (%p) registering - name %s", 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,7 +449,7 @@ int vmbus_child_driver_register(struct driver_context *driver_ctx)
ret = driver_register(&driver_ctx->driver); ret = driver_register(&driver_ctx->driver);
vmbus_drv_obj->GetChannelOffers(); vmbus_request_offers();
return ret; return ret;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment