diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-12-02 08:50:58 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-12-02 08:50:58 -0800 |
commit | 2d6e882bada0ca7828347647c5b1091bf5f18fee (patch) | |
tree | b169dbf406b0dfbcf88350e11f0d0a8ffe4aee10 | |
parent | c722bd3e2cb92be7afec346894faa29605436c1a (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>
-rw-r--r-- | drivers/staging/hv/vmbus.c | 9 | ||||
-rw-r--r-- | drivers/staging/hv/vmbus_api.h | 3 | ||||
-rw-r--r-- | drivers/staging/hv/vmbus_drv.c | 7 |
3 files changed, 2 insertions, 17 deletions
diff --git a/drivers/staging/hv/vmbus.c b/drivers/staging/hv/vmbus.c index 3aeedf6026e3..ae9e298f5c85 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 */ 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 */ int VmbusChildDeviceAdd(struct hv_device *ChildDevice) @@ -235,7 +227,6 @@ int VmbusInitialize(struct hv_driver *drv) driver->Base.OnDeviceAdd = VmbusOnDeviceAdd; driver->Base.OnDeviceRemove = VmbusOnDeviceRemove; driver->Base.OnCleanup = VmbusOnCleanup; - driver->GetChannelOffers = VmbusGetChannelOffers; /* Hypervisor initialization...setup hypercall page..etc */ ret = hv_init(); diff --git a/drivers/staging/hv/vmbus_api.h b/drivers/staging/hv/vmbus_api.h index 31549c9579ba..c85d7d43146e 100644 --- a/drivers/staging/hv/vmbus_api.h +++ b/drivers/staging/hv/vmbus_api.h @@ -124,9 +124,6 @@ struct vmbus_driver { /* Set by the caller */ int (*OnChildDeviceAdd)(struct hv_device *RootDevice, struct hv_device *ChildDevice); - - /* Set by the callee */ - void (*GetChannelOffers)(void); }; int VmbusInitialize(struct hv_driver *drv); diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index d075d9624279..6de53c40e023 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)) goto cleanup; } - - vmbus_drv_obj->GetChannelOffers(); - + vmbus_request_offers(); wait_for_completion(&hv_channel_ready); cleanup: @@ -441,7 +439,6 @@ static void vmbus_bus_exit(void) */ int vmbus_child_driver_register(struct driver_context *driver_ctx) { - struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj; int ret; DPRINT_INFO(VMBUS_DRV, "child driver (%p) registering - name %s", @@ -452,7 +449,7 @@ int vmbus_child_driver_register(struct driver_context *driver_ctx) ret = driver_register(&driver_ctx->driver); - vmbus_drv_obj->GetChannelOffers(); + vmbus_request_offers(); return ret; } |