diff options
author | K. Y. Srinivasan <kys@microsoft.com> | 2011-04-22 17:13:32 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-04-25 19:20:46 -0400 |
commit | 349b38e8dfbf79e093e22a606f637a19c1b857fa (patch) | |
tree | b2c9d09a63190c7a11805374ddec5ec29cddd8d1 | |
parent | 583c367fdf66d61e04898ee31c46c07a9a9a4434 (diff) |
Staging: hv: Get rid of the forward declaration of blkvsc_revalidate_disk()
Get rid of the forward declaration of blkvsc_revalidate_disk() by moving
the code around.
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: Abhishek Kane <v-abkane@microsoft.com>
Signed-off-by: Hank Janssen <hjanssen@microsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r-- | drivers/staging/hv/blkvsc_drv.c | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index 900ffc19f00b..2094d00b7cb3 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c | |||
@@ -853,9 +853,23 @@ static int blkvsc_do_read_capacity16(struct block_device_context *blkdev) | |||
853 | return 0; | 853 | return 0; |
854 | } | 854 | } |
855 | 855 | ||
856 | static int blkvsc_revalidate_disk(struct gendisk *gd) | ||
857 | { | ||
858 | struct block_device_context *blkdev = gd->private_data; | ||
859 | |||
860 | DPRINT_DBG(BLKVSC_DRV, "- enter\n"); | ||
861 | |||
862 | if (blkdev->device_type == DVD_TYPE) { | ||
863 | blkvsc_do_read_capacity(blkdev); | ||
864 | set_capacity(blkdev->gd, blkdev->capacity * | ||
865 | (blkdev->sector_size/512)); | ||
866 | blk_queue_logical_block_size(gd->queue, blkdev->sector_size); | ||
867 | } | ||
868 | return 0; | ||
869 | } | ||
870 | |||
856 | /* Static decl */ | 871 | /* Static decl */ |
857 | static int blkvsc_probe(struct device *dev); | 872 | static int blkvsc_probe(struct device *dev); |
858 | static int blkvsc_revalidate_disk(struct gendisk *gd); | ||
859 | static void blkvsc_request(struct request_queue *queue); | 873 | static void blkvsc_request(struct request_queue *queue); |
860 | static void blkvsc_request_completion(struct hv_storvsc_request *request); | 874 | static void blkvsc_request_completion(struct hv_storvsc_request *request); |
861 | static int blkvsc_do_request(struct block_device_context *blkdev, | 875 | static int blkvsc_do_request(struct block_device_context *blkdev, |
@@ -1504,21 +1518,6 @@ static void blkvsc_request(struct request_queue *queue) | |||
1504 | } | 1518 | } |
1505 | } | 1519 | } |
1506 | 1520 | ||
1507 | static int blkvsc_revalidate_disk(struct gendisk *gd) | ||
1508 | { | ||
1509 | struct block_device_context *blkdev = gd->private_data; | ||
1510 | |||
1511 | DPRINT_DBG(BLKVSC_DRV, "- enter\n"); | ||
1512 | |||
1513 | if (blkdev->device_type == DVD_TYPE) { | ||
1514 | blkvsc_do_read_capacity(blkdev); | ||
1515 | set_capacity(blkdev->gd, blkdev->capacity * | ||
1516 | (blkdev->sector_size/512)); | ||
1517 | blk_queue_logical_block_size(gd->queue, blkdev->sector_size); | ||
1518 | } | ||
1519 | return 0; | ||
1520 | } | ||
1521 | |||
1522 | static int __init blkvsc_init(void) | 1521 | static int __init blkvsc_init(void) |
1523 | { | 1522 | { |
1524 | int ret; | 1523 | int ret; |