]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/ide/ppc/pmac.c
ide: remove superfluous ->waiting_for_dma checks
[linux-2.6-omap-h63xx.git] / drivers / ide / ppc / pmac.c
index fa2be26272d565fe6284ae2ea37878f0456c6932..2de22b6fe3bdbd271e5d4b50a1888f18a0aa1750 100644 (file)
@@ -669,9 +669,9 @@ static void
 set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2,
                        u8 speed)
 {
+       u16 *id = drive->id;
        int cycleTime, accessTime = 0, recTime = 0;
        unsigned accessTicks, recTicks;
-       struct hd_driveid *id = drive->id;
        struct mdma_timings_t* tm = NULL;
        int i;
 
@@ -686,8 +686,8 @@ set_timings_mdma(ide_drive_t *drive, int intf_type, u32 *timings, u32 *timings2,
        }
 
        /* Check if drive provides explicit DMA cycle time */
-       if ((id->field_valid & 2) && id->eide_dma_time)
-               cycleTime = max_t(int, id->eide_dma_time, cycleTime);
+       if ((id[ATA_ID_FIELD_VALID] & 2) && id[ATA_ID_EIDE_DMA_TIME])
+               cycleTime = max_t(int, id[ATA_ID_EIDE_DMA_TIME], cycleTime);
 
        /* OHare limits according to some old Apple sources */  
        if ((intf_type == controller_ohare) && (cycleTime < 150))
@@ -966,11 +966,11 @@ static void pmac_ide_init_dev(ide_drive_t *drive)
        if (pmif->mediabay) {
 #ifdef CONFIG_PMAC_MEDIABAY
                if (check_media_bay_by_base(pmif->regbase, MB_CD) == 0) {
-                       drive->noprobe = 0;
+                       drive->dev_flags &= ~IDE_DFLAG_NOPROBE;
                        return;
                }
 #endif
-               drive->noprobe = 1;
+               drive->dev_flags |= IDE_DFLAG_NOPROBE;
        }
 }
 
@@ -1672,9 +1672,6 @@ pmac_ide_dma_test_irq (ide_drive_t *drive)
        status = readl(&dma->status);
        if (!(status & ACTIVE))
                return 1;
-       if (!drive->waiting_for_dma)
-               printk(KERN_WARNING "ide%d, ide_dma_test_irq \
-                       called while not waiting\n", HWIF(drive)->index);
 
        /* If dbdma didn't execute the STOP command yet, the
         * active bit is still set. We consider that we aren't