|
@@ -222,7 +222,7 @@ static void init_hwif_data(ide_hwif_t *hwif, unsigned int index)
|
|
|
hwif->mwdma_mask = 0x80; /* disable all mwdma */
|
|
|
hwif->swdma_mask = 0x80; /* disable all swdma */
|
|
|
|
|
|
- sema_init(&hwif->gendev_rel_sem, 0);
|
|
|
+ init_completion(&hwif->gendev_rel_comp);
|
|
|
|
|
|
default_hwif_iops(hwif);
|
|
|
default_hwif_transport(hwif);
|
|
@@ -245,7 +245,7 @@ static void init_hwif_data(ide_hwif_t *hwif, unsigned int index)
|
|
|
drive->is_flash = 0;
|
|
|
drive->vdma = 0;
|
|
|
INIT_LIST_HEAD(&drive->list);
|
|
|
- sema_init(&drive->gendev_rel_sem, 0);
|
|
|
+ init_completion(&drive->gendev_rel_comp);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -602,7 +602,7 @@ void ide_unregister(unsigned int index)
|
|
|
}
|
|
|
spin_unlock_irq(&ide_lock);
|
|
|
device_unregister(&drive->gendev);
|
|
|
- down(&drive->gendev_rel_sem);
|
|
|
+ wait_for_completion(&drive->gendev_rel_comp);
|
|
|
spin_lock_irq(&ide_lock);
|
|
|
}
|
|
|
hwif->present = 0;
|
|
@@ -662,7 +662,7 @@ void ide_unregister(unsigned int index)
|
|
|
/* More messed up locking ... */
|
|
|
spin_unlock_irq(&ide_lock);
|
|
|
device_unregister(&hwif->gendev);
|
|
|
- down(&hwif->gendev_rel_sem);
|
|
|
+ wait_for_completion(&hwif->gendev_rel_comp);
|
|
|
|
|
|
/*
|
|
|
* Remove us from the kernel's knowledge
|