From: Finn Thain Date: Thu, 12 Apr 2018 00:50:14 +0000 (-0400) Subject: block/swim: Select appropriate drive on device open X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=8c37ac3c04e7122843505c7bfd054fbb7f320777;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git block/swim: Select appropriate drive on device open commit b3906535ccc6cd04c42f9b1c7e31d1947b3ebc74 upstream. The driver supports internal and external FDD units so the floppy_open function must not hard-code the drive location. Cc: Laurent Vivier Cc: Jens Axboe Cc: stable@vger.kernel.org # v4.14+ Tested-by: Stan Johnson Signed-off-by: Finn Thain Acked-by: Laurent Vivier Signed-off-by: Jens Axboe Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/block/swim.c b/drivers/block/swim.c index 2ab70494ace4..b82aaa49df47 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c @@ -646,7 +646,7 @@ static int floppy_open(struct block_device *bdev, fmode_t mode) swim_write(base, setup, S_IBM_DRIVE | S_FCLK_DIV2); udelay(10); - swim_drive(base, INTERNAL_DRIVE); + swim_drive(base, fs->location); swim_motor(base, ON); swim_action(base, SETMFM); if (fs->ejected)