Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
[firefly-linux-kernel-4.4.55.git] / drivers / ide / ppc / pmac.c
index fa2be26272d565fe6284ae2ea37878f0456c6932..c3432da78d5227b46f106ac995af650ac7d2c0fd 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))