]> git.karo-electronics.de Git - linux-beck.git/commitdiff
Staging: hv: Cleanup initialization of blkvsc driver
authorK. Y. Srinivasan <kys@microsoft.com>
Wed, 23 Mar 2011 17:50:30 +0000 (10:50 -0700)
committerGreg Kroah-Hartman <gregkh@suse.de>
Tue, 5 Apr 2011 04:50:45 +0000 (21:50 -0700)
Cleanup the initialization sequence for the block driver.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/staging/hv/blkvsc_drv.c
drivers/staging/hv/storvsc_api.h

index f1bf44bb09e68b89f0632045dc97492e8f88c5fc..a5c0ac4bc8949a20205eff0f93856dec89d8f8b8 100644 (file)
@@ -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;
        int ret = 0;
@@ -244,7 +244,7 @@ static const struct block_device_operations block_ops = {
 /*
  * 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 hv_driver *drv = &g_blkvsc_drv.base;
@@ -255,7 +255,7 @@ static int blkvsc_drv_init(int (*drv_init)(struct hv_driver *drv))
        drv->priv = storvsc_drv_obj;
 
        /* 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;
 
@@ -1555,7 +1555,7 @@ static int __init blkvsc_init(void)
 
        DPRINT_INFO(BLKVSC_DRV, "Blkvsc initializing....");
 
-       ret = blkvsc_drv_init(blk_vsc_initialize);
+       ret = blkvsc_drv_init();
 
        return ret;
 }
index 9a452f26c4a6636bdc55bb7da1dc2c655869e090..d985bbfe7621acbc69ebfc9ef2225adc3183966e 100644 (file)
@@ -139,7 +139,6 @@ struct storvsc_device {
 
 /* Interface */
 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,
                                void *additional_info);