aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/block/floppy.c
diff options
context:
space:
mode:
authorJiri Slaby <jirislaby@gmail.com>2008-03-13 15:32:43 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-03-13 16:11:43 -0400
commitf2005e1777614b65d1970924ca1b61e4caccb0d3 (patch)
treed78705602ae404cd04a8eb8780e4ec52ec1600de /drivers/block/floppy.c
parentbd0e88e5174035d69204636289a21dc4c14238ec (diff)
block: floppy: fix rmmod lockup
Floppy rmmod locks up when no such hardware was initialized, since there is nobody to wake the remove code up. Remove the completion, because release is called during platform_unregister anyway. Signed-off-by: Jiri Slaby <jirislaby@gmail.com> Cc: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/block/floppy.c')
-rw-r--r--drivers/block/floppy.c5
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/block/floppy.c b/drivers/block/floppy.c
index 32c79a55511b..7652e87d60c5 100644
--- a/drivers/block/floppy.c
+++ b/drivers/block/floppy.c
@@ -217,7 +217,6 @@ static int use_virtual_dma;
217 */ 217 */
218 218
219static DEFINE_SPINLOCK(floppy_lock); 219static DEFINE_SPINLOCK(floppy_lock);
220static struct completion device_release;
221 220
222static unsigned short virtual_dma_port = 0x3f0; 221static unsigned short virtual_dma_port = 0x3f0;
223irqreturn_t floppy_interrupt(int irq, void *dev_id); 222irqreturn_t floppy_interrupt(int irq, void *dev_id);
@@ -4144,7 +4143,6 @@ DEVICE_ATTR(cmos,S_IRUGO,floppy_cmos_show,NULL);
4144 4143
4145static void floppy_device_release(struct device *dev) 4144static void floppy_device_release(struct device *dev)
4146{ 4145{
4147 complete(&device_release);
4148} 4146}
4149 4147
4150static struct platform_device floppy_device[N_DRIVE]; 4148static struct platform_device floppy_device[N_DRIVE];
@@ -4539,7 +4537,6 @@ void cleanup_module(void)
4539{ 4537{
4540 int drive; 4538 int drive;
4541 4539
4542 init_completion(&device_release);
4543 blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256); 4540 blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256);
4544 unregister_blkdev(FLOPPY_MAJOR, "fd"); 4541 unregister_blkdev(FLOPPY_MAJOR, "fd");
4545 4542
@@ -4564,8 +4561,6 @@ void cleanup_module(void)
4564 4561
4565 /* eject disk, if any */ 4562 /* eject disk, if any */
4566 fd_eject(0); 4563 fd_eject(0);
4567
4568 wait_for_completion(&device_release);
4569} 4564}
4570 4565
4571module_param(floppy, charp, 0); 4566module_param(floppy, charp, 0);