Staging: hv: merge VmbusInitialize into vmbus_bus_init
No need to have two functions for this. Cc: Haiyang Zhang <haiyangz@microsoft.com> Cc: Hank Janssen <hjanssen@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
This commit is contained in:
parent
0bdb250c69
commit
6d26e38fa2
|
@ -294,40 +294,6 @@ int vmbus_on_isr(struct hv_driver *drv)
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* VmbusInitialize - Main entry point
|
|
||||||
*/
|
|
||||||
static int VmbusInitialize(struct hv_driver *driver)
|
|
||||||
{
|
|
||||||
int ret;
|
|
||||||
|
|
||||||
DPRINT_INFO(VMBUS, "+++++++ HV Driver version = %s +++++++",
|
|
||||||
HV_DRV_VERSION);
|
|
||||||
DPRINT_INFO(VMBUS, "+++++++ Vmbus supported version = %d +++++++",
|
|
||||||
VMBUS_REVISION_NUMBER);
|
|
||||||
DPRINT_INFO(VMBUS, "+++++++ Vmbus using SINT %d +++++++",
|
|
||||||
VMBUS_MESSAGE_SINT);
|
|
||||||
DPRINT_DBG(VMBUS, "sizeof(vmbus_channel_packet_page_buffer)=%zd, "
|
|
||||||
"sizeof(VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER)=%zd",
|
|
||||||
sizeof(struct vmbus_channel_packet_page_buffer),
|
|
||||||
sizeof(struct vmbus_channel_packet_multipage_buffer));
|
|
||||||
|
|
||||||
driver->name = gDriverName;
|
|
||||||
memcpy(&driver->deviceType, &gVmbusDeviceType, sizeof(struct hv_guid));
|
|
||||||
|
|
||||||
/* Setup dispatch table */
|
|
||||||
driver->OnDeviceAdd = VmbusOnDeviceAdd;
|
|
||||||
driver->OnDeviceRemove = VmbusOnDeviceRemove;
|
|
||||||
driver->OnCleanup = VmbusOnCleanup;
|
|
||||||
|
|
||||||
/* Hypervisor initialization...setup hypercall page..etc */
|
|
||||||
ret = hv_init();
|
|
||||||
if (ret != 0)
|
|
||||||
DPRINT_ERR(VMBUS, "Unable to initialize the hypervisor - 0x%x",
|
|
||||||
ret);
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
|
|
||||||
static void get_channel_info(struct hv_device *device,
|
static void get_channel_info(struct hv_device *device,
|
||||||
struct hv_device_info *info)
|
struct hv_device_info *info)
|
||||||
{
|
{
|
||||||
|
@ -496,10 +462,30 @@ static int vmbus_bus_init(void)
|
||||||
int ret;
|
int ret;
|
||||||
unsigned int vector;
|
unsigned int vector;
|
||||||
|
|
||||||
/* Call to bus driver to initialize */
|
DPRINT_INFO(VMBUS, "+++++++ HV Driver version = %s +++++++",
|
||||||
ret = VmbusInitialize(driver);
|
HV_DRV_VERSION);
|
||||||
|
DPRINT_INFO(VMBUS, "+++++++ Vmbus supported version = %d +++++++",
|
||||||
|
VMBUS_REVISION_NUMBER);
|
||||||
|
DPRINT_INFO(VMBUS, "+++++++ Vmbus using SINT %d +++++++",
|
||||||
|
VMBUS_MESSAGE_SINT);
|
||||||
|
DPRINT_DBG(VMBUS, "sizeof(vmbus_channel_packet_page_buffer)=%zd, "
|
||||||
|
"sizeof(VMBUS_CHANNEL_PACKET_MULITPAGE_BUFFER)=%zd",
|
||||||
|
sizeof(struct vmbus_channel_packet_page_buffer),
|
||||||
|
sizeof(struct vmbus_channel_packet_multipage_buffer));
|
||||||
|
|
||||||
|
driver->name = gDriverName;
|
||||||
|
memcpy(&driver->deviceType, &gVmbusDeviceType, sizeof(struct hv_guid));
|
||||||
|
|
||||||
|
/* Setup dispatch table */
|
||||||
|
driver->OnDeviceAdd = VmbusOnDeviceAdd;
|
||||||
|
driver->OnDeviceRemove = VmbusOnDeviceRemove;
|
||||||
|
driver->OnCleanup = VmbusOnCleanup;
|
||||||
|
|
||||||
|
/* Hypervisor initialization...setup hypercall page..etc */
|
||||||
|
ret = hv_init();
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
DPRINT_ERR(VMBUS_DRV, "Unable to initialize vmbus (%d)", ret);
|
DPRINT_ERR(VMBUS, "Unable to initialize the hypervisor - 0x%x",
|
||||||
|
ret);
|
||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue