The driver supports internal and external FDD units so the floppy_open function must not hard-code the drive location.
Cc: Laurent Vivier <[email protected]> Cc: Jens Axboe <[email protected]> Cc: [email protected] # v4.14+ Tested-by: Stan Johnson <[email protected]> Signed-off-by: Finn Thain <[email protected]> Acked-by: Laurent Vivier <[email protected]> --- drivers/block/swim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/block/swim.c b/drivers/block/swim.c index 2c75761b61e8..0e31884a9519 100644 --- a/drivers/block/swim.c +++ b/drivers/block/swim.c @@ -648,7 +648,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) -- 2.16.1

