floppy: use common function to check if floppies can be registered
authorHerton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Mon, 27 Aug 2012 23:56:55 +0000 (20:56 -0300)
committerJens Axboe <axboe@kernel.dk>
Tue, 30 Oct 2012 07:34:25 +0000 (08:34 +0100)
commit8d3ab4ebfd7435bc248873de47d0ca23076c4973
tree7e042c6419e63f9c4ec19de6bacde87450164976
parentd60e7ec18c3fb2cbf90969ccd42889eb2d03aef9
floppy: use common function to check if floppies can be registered

The same checks to see if a drive can be or is registered are
repeated through the code, factor out the checks in a common function
and replace the repeated checks with it.

Signed-off-by: Herton Ronaldo Krzesinski <herton.krzesinski@canonical.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
drivers/block/floppy.c