Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d4919829 authored by K. Y. Srinivasan's avatar K. Y. Srinivasan Committed by Greg Kroah-Hartman
Browse files

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: 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 1c8d0b7d
Loading
Loading
Loading
Loading
+1 −8
Original line number Diff line number Diff line
@@ -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,11 +1074,6 @@ 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);

	set_capacity(blkdev->gd, blkdev->capacity * (blkdev->sector_size/512));