X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=drivers%2Fide%2Fide-dma.c;fp=drivers%2Fide%2Fide-dma.c;h=0523da77425aa35ceb5905636e9a8b839bf887f4;hb=64ba3f394c830ec48a1c31b53dcae312c56f1604;hp=7c3a13e1cf647a4cbca6ee39c327c36f9de8d422;hpb=be1e6109ac94a859551f8e1774eb9a8469fe055c;p=linux-2.6.git diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index 7c3a13e1c..0523da774 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c @@ -74,6 +74,7 @@ * */ +#include #include #include #include @@ -174,7 +175,7 @@ ide_startstop_t ide_dma_intr (ide_drive_t *drive) if (rq->rq_disk) { ide_driver_t *drv; - drv = *(ide_driver_t **)rq->rq_disk->private_data; + drv = *(ide_driver_t **)rq->rq_disk->private_data;; drv->end_request(drive, 1, rq->nr_sectors); } else ide_end_request(drive, 1, rq->nr_sectors); @@ -205,7 +206,8 @@ int ide_build_sglist(ide_drive_t *drive, struct request *rq) ide_hwif_t *hwif = HWIF(drive); struct scatterlist *sg = hwif->sg_table; - BUG_ON((rq->flags & REQ_DRIVE_TASKFILE) && rq->nr_sectors > 256); + if ((rq->flags & REQ_DRIVE_TASKFILE) && rq->nr_sectors > 256) + BUG(); ide_map_sg(drive, rq); @@ -750,7 +752,7 @@ void ide_dma_verbose(ide_drive_t *drive) goto bug_dma_off; printk(", DMA"); } else if (id->field_valid & 1) { - goto bug_dma_off; + printk(", BUG"); } return; bug_dma_off: @@ -945,7 +947,8 @@ void ide_setup_dma (ide_hwif_t *hwif, unsigned long dma_base, unsigned int num_p } printk("\n"); - BUG_ON(!hwif->dma_master); + if (!(hwif->dma_master)) + BUG(); } EXPORT_SYMBOL_GPL(ide_setup_dma);