#include <linux/ide.h>
#include <linux/hdreg.h>
#include <linux/major.h>
-#include <linux/delay.h>
#include <asm/io.h>
#include <asm/system.h>
break;
}
}
- msleep(100);
+ __set_current_state(TASK_UNINTERRUPTIBLE);
+ schedule_timeout(HZ/10);
}
if (hd < 0) {
DEBUG(0, "ide_release(0x%p)\n", link);
if (info->ndev) {
- /* Wait for the interface to cease to be busy */
- while(ide_unregister_hwif(info->hwif) < 0) {
- removed_hwif_iops(info->hwif);
- msleep(1000);
- }
+ /* FIXME: if this fails we need to queue the cleanup somehow
+ -- need to investigate the required PCMCIA magic */
+ ide_unregister_hwif(info->hwif);
}
info->ndev = 0;
link->dev = NULL;