From: K. Y. Srinivasan Date: Fri, 22 Apr 2011 21:55:19 +0000 (-0700) Subject: Staging: hv: Get rid of the code to manage removable media X-Git-Tag: firefly_0821_release~7613^2~1326^2~736 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=d49198299928122d98ae7ca35dd824eaf8746ccd;p=firefly-linux-kernel-4.4.55.git Staging: hv: Get rid of the code to manage removable media The Hyper-V block driver does not handle removable media. Get rid of the code to manage removable media. Signed-off-by: K. Y. Srinivasan Signed-off-by: Haiyang Zhang Signed-off-by: Hank Janssen Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/staging/hv/blkvsc_drv.c b/drivers/staging/hv/blkvsc_drv.c index 7974e6c0f88a..92614d5ec8d0 100644 --- a/drivers/staging/hv/blkvsc_drv.c +++ b/drivers/staging/hv/blkvsc_drv.c @@ -437,8 +437,6 @@ static int blkvsc_do_operation(struct block_device_context *blkdev, if (device_type == 0x0) blkdev->device_type = HARDDISK_TYPE; - else if (device_type == 0x5) - blkdev->device_type = DVD_TYPE; else blkdev->device_type = UNKNOWN_DEV_TYPE; @@ -1076,12 +1074,7 @@ static int blkvsc_probe(struct device *device) sprintf(blkdev->gd->disk_name, "hd%c", 'a' + devnum); blkvsc_do_operation(blkdev, DO_INQUIRY); - if (blkdev->device_type == DVD_TYPE) { - set_disk_ro(blkdev->gd, 1); - blkdev->gd->flags |= GENHD_FL_REMOVABLE; - blkvsc_do_operation(blkdev, DO_CAPACITY); - } else - blkvsc_do_operation(blkdev, DO_CAPACITY); + blkvsc_do_operation(blkdev, DO_CAPACITY); set_capacity(blkdev->gd, blkdev->capacity * (blkdev->sector_size/512)); blk_queue_logical_block_size(blkdev->gd->queue, blkdev->sector_size);