]> git.baikalelectronics.ru Git - kernel.git/commit
floppy: cleanup: make set_fdc() always set current_drive and current_fd
authorWilly Tarreau <w@1wt.eu>
Fri, 10 Apr 2020 10:19:04 +0000 (12:19 +0200)
committerDenis Efremov <efremov@linux.com>
Tue, 12 May 2020 16:34:56 +0000 (19:34 +0300)
commit3c93d281ae1cc2126fec809fe16005b0c06277a3
treedf0850d53643cc102dcde3d763f67ed6c620f69c
parent59e3354bfe7350370bcc11f434075d7aa6db739f
floppy: cleanup: make set_fdc() always set current_drive and current_fd

When called with a negative drive value, set_fdc() would stick to the
current fdc (which was assumed to reflect the current_drive's FDC). We
do not need this anymore as the last call place with a negative value
was just addressed. Let's make this function always set both current_fdc
and current_drive so that there's no more ambiguity. A few comments
stating this were added to a few non-obvious places.

Link: https://lore.kernel.org/r/20200410101904.14652-3-w@1wt.eu
Signed-off-by: Willy Tarreau <w@1wt.eu>
Signed-off-by: Denis Efremov <efremov@linux.com>
drivers/block/floppy.c