ide: keep pointer to struct device instead of struct pci_dev in ide_hwif_t
[deliverable/linux.git] / drivers / ide / pci / hpt34x.c
index ae6307fae4f9311b35ba24b7727e5c21b05c6b54..7f6abc68c0bbc1d7b3490ec9691dbb79f8afcb39 100644 (file)
@@ -45,7 +45,7 @@
 
 static void hpt34x_set_mode(ide_drive_t *drive, const u8 speed)
 {
-       struct pci_dev *dev     = HWIF(drive)->pci_dev;
+       struct pci_dev *dev = to_pci_dev(drive->hwif->dev);
        u32 reg1= 0, tmp1 = 0, reg2 = 0, tmp2 = 0;
        u8                      hi_speed, lo_speed;
 
@@ -129,14 +129,19 @@ static void __devinit init_hwif_hpt34x(ide_hwif_t *hwif)
        hwif->set_dma_mode = &hpt34x_set_mode;
 }
 
+#define IDE_HFLAGS_HPT34X \
+       (IDE_HFLAG_NO_ATAPI_DMA | \
+        IDE_HFLAG_NO_DSC | \
+        IDE_HFLAG_ABUSE_SET_DMA_MODE | \
+        IDE_HFLAG_NO_AUTODMA)
+
 static const struct ide_port_info hpt34x_chipsets[] __devinitdata = {
        { /* 0 */
                .name           = "HPT343",
                .init_chipset   = init_chipset_hpt34x,
                .init_hwif      = init_hwif_hpt34x,
                .extra          = 16,
-               .host_flags     = IDE_HFLAG_NO_ATAPI_DMA |
-                                 IDE_HFLAG_NO_AUTODMA,
+               .host_flags     = IDE_HFLAGS_HPT34X,
                .pio_mask       = ATA_PIO5,
        },
        { /* 1 */
@@ -144,9 +149,7 @@ static const struct ide_port_info hpt34x_chipsets[] __devinitdata = {
                .init_chipset   = init_chipset_hpt34x,
                .init_hwif      = init_hwif_hpt34x,
                .extra          = 16,
-               .host_flags     = IDE_HFLAG_NO_ATAPI_DMA |
-                                 IDE_HFLAG_NO_AUTODMA |
-                                 IDE_HFLAG_OFF_BOARD,
+               .host_flags     = IDE_HFLAGS_HPT34X | IDE_HFLAG_OFF_BOARD,
                .pio_mask       = ATA_PIO5,
 #ifdef CONFIG_HPT34X_AUTODMA
                .swdma_mask     = ATA_SWDMA2,
This page took 0.026216 seconds and 5 git commands to generate.