[PATCH] mutex subsystem, semaphore to completion: IDE ->gendev_rel_sem
The patch changes semaphores that are initialized as
locked to complete().
Source: MontaVista Software, Inc.
Modified-by: Steven Rostedt <rostedt@goodmis.org>
The following patch is from Montavista. I modified it slightly.
Semaphores are currently being used where it makes more sense for
completions. This patch corrects that.
Signed-off-by: Aleksey Makarov <amakarov@ru.mvista.com>
Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
diff --git a/drivers/ide/ide-probe.c b/drivers/ide/ide-probe.c
index 1ddaa71..7cb2d86 100644
--- a/drivers/ide/ide-probe.c
+++ b/drivers/ide/ide-probe.c
@@ -655,7 +655,7 @@
{
ide_hwif_t *hwif = container_of(dev, ide_hwif_t, gendev);
- up(&hwif->gendev_rel_sem);
+ complete(&hwif->gendev_rel_comp);
}
static void hwif_register (ide_hwif_t *hwif)
@@ -1327,7 +1327,7 @@
drive->queue = NULL;
spin_unlock_irq(&ide_lock);
- up(&drive->gendev_rel_sem);
+ complete(&drive->gendev_rel_comp);
}
/*