linux 2.6.16.38 w/ vs2.0.3-rc1
[linux-2.6.git] / drivers / ide / ide-dma.c
index 7c3a13e..0523da7 100644 (file)
@@ -74,6 +74,7 @@
  *
  */
 
+#include <linux/config.h>
 #include <linux/module.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -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);