/* static void fd_dma_interrupt(int irq, void *dev_id) { }  */
static int grab_drive(struct floppy_state *fs, enum swim_state state, int interruptible)
/* static void fd_dma_interrupt(int irq, void *dev_id) { }  */
static int grab_drive(struct floppy_state *fs, enum swim_state state, int interruptible)
{
	unsigned long flags;
	spin_lock_irqsave(&fs->lock, flags);
	if (fs->state != idle) {
		++fs->wanted;
		while (fs->state != available) {
			if (interruptible && signal_pending(current)) {
				--fs->wanted;
				spin_unlock_irqrestore(&fs->lock, flags);
				return -EINTR;
			}
			interruptible_sleep_on(&fs->wait);
		}
		--fs->wanted;
	}
	fs->state = state;
	spin_unlock_irqrestore(&fs->lock, flags);
	return 0;
}