diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2010-01-08 10:24:26 -0800 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2010-03-03 16:42:36 -0800 |
commit | 354b0a643e89dd3163278c9a0ac9cbcb9ef5c298 (patch) | |
tree | 82d6bb14803ee6a608b89921ecaaee564b01d392 /drivers/staging/hv | |
parent | 99358ca725513de0a97971eb019d4a5544d83760 (diff) |
Staging: hv: remove unneeded OnHostReset callback
This callback only calls one function, so just call the function
instead, no need for indirection at all.
Cc: Hank Janssen <hjanssen@microsoft.com>
Cc: Haiyang Zhang <haiyangz@microsoft.com>.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/hv')
-rw-r--r-- | drivers/staging/hv/StorVsc.c | 3 | ||||
-rw-r--r-- | drivers/staging/hv/StorVscApi.h | 2 | ||||
-rw-r--r-- | drivers/staging/hv/storvsc_drv.c | 10 |
3 files changed, 3 insertions, 12 deletions
diff --git a/drivers/staging/hv/StorVsc.c b/drivers/staging/hv/StorVsc.c index 2f7c425896f..38ea1407f22 100644 --- a/drivers/staging/hv/StorVsc.c +++ b/drivers/staging/hv/StorVsc.c @@ -625,7 +625,7 @@ static int StorVscOnDeviceRemove(struct hv_device *Device) return 0; } -static int StorVscOnHostReset(struct hv_device *Device) +int StorVscOnHostReset(struct hv_device *Device) { struct storvsc_device *storDevice; struct storvsc_request_extension *request; @@ -842,7 +842,6 @@ int StorVscInitialize(struct hv_driver *Driver) storDriver->Base.OnCleanup = StorVscOnCleanup; storDriver->OnIORequest = StorVscOnIORequest; - storDriver->OnHostReset = StorVscOnHostReset; DPRINT_EXIT(STORVSC); diff --git a/drivers/staging/hv/StorVscApi.h b/drivers/staging/hv/StorVscApi.h index 1aca24e6503..126a8588edb 100644 --- a/drivers/staging/hv/StorVscApi.h +++ b/drivers/staging/hv/StorVscApi.h @@ -94,7 +94,6 @@ struct storvsc_driver_object { /* Specific to this driver */ int (*OnIORequest)(struct hv_device *Device, struct hv_storvsc_request *Request); - int (*OnHostReset)(struct hv_device *Device); }; struct storvsc_device_info { @@ -105,6 +104,7 @@ struct storvsc_device_info { /* Interface */ int StorVscInitialize(struct hv_driver *driver); +int StorVscOnHostReset(struct hv_device *Device); int BlkVscInitialize(struct hv_driver *driver); #endif /* _STORVSC_API_H_ */ diff --git a/drivers/staging/hv/storvsc_drv.c b/drivers/staging/hv/storvsc_drv.c index 56c911e7ade..12f8f3f64c6 100644 --- a/drivers/staging/hv/storvsc_drv.c +++ b/drivers/staging/hv/storvsc_drv.c @@ -870,13 +870,6 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) struct host_device_context *host_device_ctx = (struct host_device_context *)scmnd->device->host->hostdata; struct device_context *device_ctx = host_device_ctx->device_ctx; - struct driver_context *driver_ctx = - driver_to_driver_context(device_ctx->device.driver); - struct storvsc_driver_context *storvsc_drv_ctx = - (struct storvsc_driver_context *)driver_ctx; - - struct storvsc_driver_object *storvsc_drv_obj = - &storvsc_drv_ctx->drv_obj; DPRINT_ENTER(STORVSC_DRV); @@ -884,8 +877,7 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) scmnd->device, &device_ctx->device_obj); /* Invokes the vsc to reset the host/bus */ - ASSERT(storvsc_drv_obj->OnHostReset); - ret = storvsc_drv_obj->OnHostReset(&device_ctx->device_obj); + ret = StorVscOnHostReset(&device_ctx->device_obj); if (ret != 0) { DPRINT_EXIT(STORVSC_DRV); return ret; |