Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+2 -17
-9
drivers/staging/hv/vmbus.c
··· 53 53 static struct hv_device *gDevice; /* vmbus root device */ 54 54 55 55 /* 56 - * VmbusGetChannelOffers - Retrieve the channel offers from the parent partition 57 - */ 58 - static void VmbusGetChannelOffers(void) 59 - { 60 - vmbus_request_offers(); 61 - } 62 - 63 - /* 64 56 * VmbusChildDeviceAdd - Registers the child device with the vmbus 65 57 */ 66 58 int VmbusChildDeviceAdd(struct hv_device *ChildDevice) ··· 227 235 driver->Base.OnDeviceAdd = VmbusOnDeviceAdd; 228 236 driver->Base.OnDeviceRemove = VmbusOnDeviceRemove; 229 237 driver->Base.OnCleanup = VmbusOnCleanup; 230 - driver->GetChannelOffers = VmbusGetChannelOffers; 231 238 232 239 /* Hypervisor initialization...setup hypercall page..etc */ 233 240 ret = hv_init();
-3
drivers/staging/hv/vmbus_api.h
··· 124 124 /* Set by the caller */ 125 125 int (*OnChildDeviceAdd)(struct hv_device *RootDevice, 126 126 struct hv_device *ChildDevice); 127 - 128 - /* Set by the callee */ 129 - void (*GetChannelOffers)(void); 130 127 }; 131 128 132 129 int VmbusInitialize(struct hv_driver *drv);
+2 -5
drivers/staging/hv/vmbus_drv.c
··· 387 387 goto cleanup; 388 388 } 389 389 390 - 391 - vmbus_drv_obj->GetChannelOffers(); 392 - 390 + vmbus_request_offers(); 393 391 wait_for_completion(&hv_channel_ready); 394 392 395 393 cleanup: ··· 439 441 */ 440 442 int vmbus_child_driver_register(struct driver_context *driver_ctx) 441 443 { 442 - struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj; 443 444 int ret; 444 445 445 446 DPRINT_INFO(VMBUS_DRV, "child driver (%p) registering - name %s", ··· 449 452 450 453 ret = driver_register(&driver_ctx->driver); 451 454 452 - vmbus_drv_obj->GetChannelOffers(); 455 + vmbus_request_offers(); 453 456 454 457 return ret; 455 458 }