ide: use mutex instead of ide_cfg_sem semaphore in IDE driver
The IDE driver uses a semaphore as mutex. Use the mutex API instead of the (binary) semaphore. Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
This commit is contained in:
committed by
Bartlomiej Zolnierkiewicz
parent
c283f5dbe3
commit
ef29888ea8
@@ -1025,7 +1025,7 @@ static int init_irq (ide_hwif_t *hwif)
|
||||
BUG_ON(irqs_disabled());
|
||||
BUG_ON(hwif == NULL);
|
||||
|
||||
down(&ide_cfg_sem);
|
||||
mutex_lock(&ide_cfg_mtx);
|
||||
hwif->hwgroup = NULL;
|
||||
#if MAX_HWIFS > 1
|
||||
/*
|
||||
@@ -1154,7 +1154,7 @@ static int init_irq (ide_hwif_t *hwif)
|
||||
printk(" (%sed with %s)",
|
||||
hwif->sharing_irq ? "shar" : "serializ", match->name);
|
||||
printk("\n");
|
||||
up(&ide_cfg_sem);
|
||||
mutex_unlock(&ide_cfg_mtx);
|
||||
return 0;
|
||||
out_unlink:
|
||||
spin_lock_irq(&ide_lock);
|
||||
@@ -1177,7 +1177,7 @@ out_unlink:
|
||||
}
|
||||
spin_unlock_irq(&ide_lock);
|
||||
out_up:
|
||||
up(&ide_cfg_sem);
|
||||
mutex_unlock(&ide_cfg_mtx);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user