aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2011-04-22 17:13:32 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2011-04-25 19:20:46 -0400
commit349b38e8dfbf79e093e22a606f637a19c1b857fa (patch)
treeb2c9d09a63190c7a11805374ddec5ec29cddd8d1
parent583c367fdf66d61e04898ee31c46c07a9a9a4434 (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.c31
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
856static 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 */
857static int blkvsc_probe(struct device *dev); 872static int blkvsc_probe(struct device *dev);
858static int blkvsc_revalidate_disk(struct gendisk *gd);
859static void blkvsc_request(struct request_queue *queue); 873static void blkvsc_request(struct request_queue *queue);
860static void blkvsc_request_completion(struct hv_storvsc_request *request); 874static void blkvsc_request_completion(struct hv_storvsc_request *request);
861static int blkvsc_do_request(struct block_device_context *blkdev, 875static 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
1507static 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
1522static int __init blkvsc_init(void) 1521static int __init blkvsc_init(void)
1523{ 1522{
1524 int ret; 1523 int ret;