diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-02 18:53:59 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 19:02:03 (GMT) |
commit | 21707bed7e0577c32546e8e0ce74a18528acf398 (patch) | |
tree | b0fee195b741e7efd57ad73f74d1da7a3404576e /drivers/staging/hv | |
parent | 7903506975905605bbb9077008ca83eabc0f6272 (diff) | |
download | linux-fsl-qoriq-21707bed7e0577c32546e8e0ce74a18528acf398.tar.xz |
Staging: hv: remove function pointer typedefs from vmbus.h
It's amazing the hoops that people go through to make code work
when they don't opensource the whole thing. Passing these types
of function pointers around for no good reason is a mess, this needs
to be unwound as everything is now in the open.
Cc: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv')
-rw-r--r-- | drivers/staging/hv/blkvsc_drv.c | 4 | ||||
-rw-r--r-- | drivers/staging/hv/netvsc_drv.c | 4 | ||||
-rw-r--r-- | drivers/staging/hv/storvsc_drv.c | 4 | ||||
-rw-r--r-- | drivers/staging/hv/vmbus.h | 4 | ||||
-rw-r--r-- | drivers/staging/hv/vmbus_drv.c | 4 |
5 files changed, 8 insertions, 12 deletions
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index 7c383ad..99c4926 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -165,7 +165,7 @@ static struct block_device_operations block_ops = { /** * 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; @@ -178,7 +178,7 @@ static int blkvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init) 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, diff --git a/drivers/staging/hv/netvsc_drv.c b/drivers/staging/hv/netvsc_drv.c index 70f66cb..3192d50 100644 --- a/drivers/staging/hv/netvsc_drv.c +++ b/drivers/staging/hv/netvsc_drv.c @@ -559,7 +559,7 @@ static void netvsc_drv_exit(void) 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; @@ -574,7 +574,7 @@ static int netvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init) 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, diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index ba15f54..d49dc21 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -137,7 +137,7 @@ static struct scsi_host_template scsi_driver = { /** * 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; @@ -151,7 +151,7 @@ static int storvsc_drv_init(PFN_DRIVERINITIALIZE pfn_drv_init) 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", diff --git a/drivers/staging/hv/vmbus.h b/drivers/staging/hv/vmbus.h index 045483b..ae0a896 100644 --- a/drivers/staging/hv/vmbus.h +++ b/drivers/staging/hv/vmbus.h @@ -26,12 +26,8 @@ #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; diff --git a/drivers/staging/hv/vmbus_drv.c b/drivers/staging/hv/vmbus_drv.c index b0d2481..582318f 100644 --- a/drivers/staging/hv/vmbus_drv.c +++ b/drivers/staging/hv/vmbus_drv.c @@ -241,7 +241,7 @@ static ssize_t vmbus_show_device_attr(struct device *dev, * - 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; @@ -261,7 +261,7 @@ static int vmbus_bus_init(PFN_DRIVERINITIALIZE pfn_drv_init) 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; |