/**
* blkvsc_drv_init - BlkVsc driver initialization.
*/
-static int blkvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
+static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
{
struct storvsc_driver_object *storvsc_drv_obj = &g_blkvsc_drv.drv_obj;
struct driver_context *drv_ctx = &g_blkvsc_drv.drv_ctx;
storvsc_drv_obj->RingBufferSize = blkvsc_ringbuffer_size;
/* Callback to client driver to complete the initialization */
- pfn_drv_init(&storvsc_drv_obj->Base);
+ drv_init(&storvsc_drv_obj->Base);
drv_ctx->driver.name = storvsc_drv_obj->Base.name;
memcpy(&drv_ctx->class_id, &storvsc_drv_obj->Base.deviceType,
return;
}
-static int netvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
+static int netvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
{
struct netvsc_driver *net_drv_obj = &g_netvsc_drv.drv_obj;
struct driver_context *drv_ctx = &g_netvsc_drv.drv_ctx;
net_drv_obj->OnLinkStatusChanged = netvsc_linkstatus_callback;
/* Callback to client driver to complete the initialization */
- pfn_drv_init(&net_drv_obj->Base);
+ drv_init(&net_drv_obj->Base);
drv_ctx->driver.name = net_drv_obj->Base.name;
memcpy(&drv_ctx->class_id, &net_drv_obj->Base.deviceType,
/**
* storvsc_drv_init - StorVsc driver initialization.
*/
-static int storvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init)
+static int storvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
{
int ret;
struct storvsc_driver_object *storvsc_drv_obj = &g_storvsc_drv.drv_obj;
storvsc_drv_obj->OnHostRescan = storvsc_host_rescan;
/* Callback to client driver to complete the initialization */
- pfn_drv_init(&storvsc_drv_obj->Base);
+ drv_init(&storvsc_drv_obj->Base);
DPRINT_INFO(STORVSC_DRV,
"request extension size %u, max outstanding reqs %u",
#define _VMBUS_H_
#include <linux/device.h>
-
#include "VmbusApi.h"
-typedef int (*PFN_DRIVERINITIALIZE)(struct hv_driver *drv);
-typedef int (*PFN_DRIVEREXIT)(struct hv_driver *drv);
-
struct driver_context {
struct hv_guid class_id;
* - setup the vmbus root device
* - retrieve the channel offers
*/
-static int vmbus_bus_init(PFN_DRIVERINITIALIZE pfn_drv_init)
+static int vmbus_bus_init(int (*drv_init)(struct hv_driver *drv))
{
struct vmbus_driver_context *vmbus_drv_ctx = &g_vmbus_drv;
struct vmbus_driver *vmbus_drv_obj = &g_vmbus_drv.drv_obj;
vmbus_drv_obj->OnChildDeviceRemove = vmbus_child_device_unregister;
/* Call to bus driver to initialize */
- ret = pfn_drv_init(&vmbus_drv_obj->Base);
+ ret = drv_init(&vmbus_drv_obj->Base);
if (ret != 0) {
DPRINT_ERR(VMBUS_DRV, "Unable to initialize vmbus (%d)", ret);
goto cleanup;