*/
static DEFINE_SPINLOCK(floppy_lock);
-static struct completion device_release;
static unsigned short virtual_dma_port = 0x3f0;
irqreturn_t floppy_interrupt(int irq, void *dev_id);
static void floppy_device_release(struct device *dev)
{
- complete(&device_release);
}
static struct platform_device floppy_device[N_DRIVE];
{
int drive;
- init_completion(&device_release);
blk_unregister_region(MKDEV(FLOPPY_MAJOR, 0), 256);
unregister_blkdev(FLOPPY_MAJOR, "fd");
/* eject disk, if any */
fd_eject(0);
-
- wait_for_completion(&device_release);
}
module_param(floppy, charp, 0);