Commit 834702f8 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman

Staging: hv: Cleanup initialization of blkvsc driver

Cleanup the initialization sequence for the block driver.
Signed-off-by: default avatarK. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: default avatarHaiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: default avatarHank Janssen <hjanssen@microsoft.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent 86762a5b
...@@ -155,7 +155,7 @@ static int blk_vsc_on_device_add(struct hv_device *device, ...@@ -155,7 +155,7 @@ static int blk_vsc_on_device_add(struct hv_device *device,
} }
int blk_vsc_initialize(struct hv_driver *driver) static int blk_vsc_initialize(struct hv_driver *driver)
{ {
struct storvsc_driver_object *stor_driver; struct storvsc_driver_object *stor_driver;
int ret = 0; int ret = 0;
...@@ -244,7 +244,7 @@ static const struct block_device_operations block_ops = { ...@@ -244,7 +244,7 @@ static const struct block_device_operations block_ops = {
/* /*
* blkvsc_drv_init - BlkVsc driver initialization. * blkvsc_drv_init - BlkVsc driver initialization.
*/ */
static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) static int blkvsc_drv_init(void)
{ {
struct storvsc_driver_object *storvsc_drv_obj = &g_blkvsc_drv; struct storvsc_driver_object *storvsc_drv_obj = &g_blkvsc_drv;
struct hv_driver *drv = &g_blkvsc_drv.base; struct hv_driver *drv = &g_blkvsc_drv.base;
...@@ -255,7 +255,7 @@ static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv)) ...@@ -255,7 +255,7 @@ static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
drv->priv = storvsc_drv_obj; drv->priv = storvsc_drv_obj;
/* Callback to client driver to complete the initialization */ /* Callback to client driver to complete the initialization */
drv_init(&storvsc_drv_obj->base); blk_vsc_initialize(&storvsc_drv_obj->base);
drv->driver.name = storvsc_drv_obj->base.name; drv->driver.name = storvsc_drv_obj->base.name;
...@@ -1555,7 +1555,7 @@ static int __init blkvsc_init(void) ...@@ -1555,7 +1555,7 @@ static int __init blkvsc_init(void)
DPRINT_INFO(BLKVSC_DRV, "Blkvsc initializing...."); DPRINT_INFO(BLKVSC_DRV, "Blkvsc initializing....");
ret = blkvsc_drv_init(blk_vsc_initialize); ret = blkvsc_drv_init();
return ret; return ret;
} }
......
...@@ -139,7 +139,6 @@ struct storvsc_device { ...@@ -139,7 +139,6 @@ struct storvsc_device {
/* Interface */ /* Interface */
int stor_vsc_on_host_reset(struct hv_device *device); int stor_vsc_on_host_reset(struct hv_device *device);
int blk_vsc_initialize(struct hv_driver *driver);
int stor_vsc_on_device_add(struct hv_device *device, int stor_vsc_on_device_add(struct hv_device *device,
void *additional_info); void *additional_info);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment