]> err.no Git - linux-2.6/blobdiff - drivers/ide/pci/sc1200.c
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
[linux-2.6] / drivers / ide / pci / sc1200.c
index 561aa47c7720fafa38c615a4fa36d0dd62dba76d..14c787b5d95f89c8fd6406d22cd82ef72d4322bb 100644 (file)
@@ -165,7 +165,7 @@ static void sc1200_set_dma_mode(ide_drive_t *drive, const u8 mode)
  *
  *  returns 1 on error, 0 otherwise
  */
-static int sc1200_ide_dma_end (ide_drive_t *drive)
+static int sc1200_dma_end(ide_drive_t *drive)
 {
        ide_hwif_t *hwif = HWIF(drive);
        unsigned long dma_base = hwif->dma_base;
@@ -214,7 +214,7 @@ static void sc1200_set_pio_mode(ide_drive_t *drive, const u8 pio)
                printk("SC1200: %s: changing (U)DMA mode\n", drive->name);
                ide_dma_off_quietly(drive);
                if (ide_set_dma_mode(drive, mode) == 0 && drive->using_dma)
-                       hwif->dma_host_set(drive, 1);
+                       hwif->dma_ops->dma_host_set(drive, 1);
                return;
        }
 
@@ -286,29 +286,30 @@ static int sc1200_resume (struct pci_dev *dev)
 }
 #endif
 
-/*
- * This gets invoked by the IDE driver once for each channel,
- * and performs channel-specific pre-initialization before drive probing.
- */
-static void __devinit init_hwif_sc1200 (ide_hwif_t *hwif)
-{
-       hwif->set_pio_mode = &sc1200_set_pio_mode;
-       hwif->set_dma_mode = &sc1200_set_dma_mode;
-
-       if (hwif->dma_base == 0)
-               return;
+static const struct ide_port_ops sc1200_port_ops = {
+       .set_pio_mode           = sc1200_set_pio_mode,
+       .set_dma_mode           = sc1200_set_dma_mode,
+       .udma_filter            = sc1200_udma_filter,
+};
 
-       hwif->udma_filter = sc1200_udma_filter;
-       hwif->ide_dma_end   = &sc1200_ide_dma_end;
-}
+static const struct ide_dma_ops sc1200_dma_ops = {
+       .dma_host_set           = ide_dma_host_set,
+       .dma_setup              = ide_dma_setup,
+       .dma_exec_cmd           = ide_dma_exec_cmd,
+       .dma_start              = ide_dma_start,
+       .dma_end                = sc1200_dma_end,
+       .dma_test_irq           = ide_dma_test_irq,
+       .dma_lost_irq           = ide_dma_lost_irq,
+       .dma_timeout            = ide_dma_timeout,
+};
 
 static const struct ide_port_info sc1200_chipset __devinitdata = {
        .name           = "SC1200",
-       .init_hwif      = init_hwif_sc1200,
+       .port_ops       = &sc1200_port_ops,
+       .dma_ops        = &sc1200_dma_ops,
        .host_flags     = IDE_HFLAG_SERIALIZE |
                          IDE_HFLAG_POST_SET_MODE |
-                         IDE_HFLAG_ABUSE_DMA_MODES |
-                         IDE_HFLAG_BOOTABLE,
+                         IDE_HFLAG_ABUSE_DMA_MODES,
        .pio_mask       = ATA_PIO4,
        .mwdma_mask     = ATA_MWDMA2,
        .udma_mask      = ATA_UDMA2,