aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-05 14:30:51 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-05 14:30:51 -0400
commit2b54ed9467697b0ce2d60d89e5e4253c9e322c26 (patch)
tree0dcc38e0e8549987f87a10940ee5df6038ac4272 /drivers/ide/ide.c
parentbd8a59e29726b2a5ff7baefe995febdc63044a61 (diff)
ide: ide_unregister() locking bugfix
Holding ide_lock for ide_release_dma_engine() call is unnecessary and triggers WARN_ON(irqs_disabled()) in dma_free_coherent(). Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index b31359c9fa58..300431d080a9 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -352,15 +352,15 @@ void ide_unregister(ide_hwif_t *hwif)
352 blk_unregister_region(MKDEV(hwif->major, 0), MAX_DRIVES<<PARTN_BITS); 352 blk_unregister_region(MKDEV(hwif->major, 0), MAX_DRIVES<<PARTN_BITS);
353 kfree(hwif->sg_table); 353 kfree(hwif->sg_table);
354 unregister_blkdev(hwif->major, hwif->name); 354 unregister_blkdev(hwif->major, hwif->name);
355 spin_lock_irq(&ide_lock);
356 355
357 if (hwif->dma_base) 356 if (hwif->dma_base)
358 ide_release_dma_engine(hwif); 357 ide_release_dma_engine(hwif);
359 358
359 spin_lock_irq(&ide_lock);
360 /* restore hwif data to pristine status */ 360 /* restore hwif data to pristine status */
361 ide_init_port_data(hwif, hwif->index); 361 ide_init_port_data(hwif, hwif->index);
362
363 spin_unlock_irq(&ide_lock); 362 spin_unlock_irq(&ide_lock);
363
364 mutex_unlock(&ide_cfg_mtx); 364 mutex_unlock(&ide_cfg_mtx);
365} 365}
366 366