Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6
[pandora-kernel.git] / drivers / ide / trm290.c
index 2a5ea90..1c09e54 100644 (file)
 
 static void trm290_prepare_drive (ide_drive_t *drive, unsigned int use_dma)
 {
-       ide_hwif_t *hwif = HWIF(drive);
+       ide_hwif_t *hwif = drive->hwif;
        u16 reg = 0;
        unsigned long flags;
 
@@ -184,7 +184,7 @@ static void trm290_dma_exec_cmd(ide_drive_t *drive, u8 command)
 static int trm290_dma_setup(ide_drive_t *drive)
 {
        ide_hwif_t *hwif = drive->hwif;
-       struct request *rq = hwif->hwgroup->rq;
+       struct request *rq = hwif->rq;
        unsigned int count, rw;
 
        if (rq_data_dir(rq)) {
@@ -222,15 +222,15 @@ static int trm290_dma_end(ide_drive_t *drive)
        drive->waiting_for_dma = 0;
        /* purge DMA mappings */
        ide_destroy_dmatable(drive);
-       status = inw(HWIF(drive)->dma_base + 2);
+       status = inw(drive->hwif->dma_base + 2);
+
        return status != 0x00ff;
 }
 
 static int trm290_dma_test_irq(ide_drive_t *drive)
 {
-       u16 status;
+       u16 status = inw(drive->hwif->dma_base + 2);
 
-       status = inw(HWIF(drive)->dma_base + 2);
        return status == 0x00ff;
 }
 
@@ -277,9 +277,6 @@ static void __devinit init_hwif_trm290(ide_hwif_t *hwif)
        if (reg & 0x10)
                /* legacy mode */
                hwif->irq = hwif->channel ? 15 : 14;
-       else if (!hwif->irq && hwif->mate && hwif->mate->irq)
-               /* sharing IRQ with mate */
-               hwif->irq = hwif->mate->irq;
 
 #if 1
        {