summaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/dtc2278.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ide/legacy/dtc2278.c')
-rw-r--r--drivers/ide/legacy/dtc2278.c24
1 files changed, 10 insertions, 14 deletions
diff --git a/drivers/ide/legacy/dtc2278.c b/drivers/ide/legacy/dtc2278.c
index 092c04abbe7..7cbf2f1f35f 100644
--- a/drivers/ide/legacy/dtc2278.c
+++ b/drivers/ide/legacy/dtc2278.c
@@ -86,6 +86,15 @@ static void dtc2278_set_pio_mode(ide_drive_t *drive, const u8 pio)
}
}
+static const struct ide_port_info dtc2278_port_info __initdata = {
+ .chipset = ide_dtc2278,
+ .host_flags = IDE_HFLAG_SERIALIZE |
+ IDE_HFLAG_IO_32BIT |
+ IDE_HFLAG_NO_DMA |
+ IDE_HFLAG_NO_AUTOTUNE,
+ .pio_mask = ATA_PIO4,
+};
+
static int __init dtc2278_probe(void)
{
unsigned long flags;
@@ -116,29 +125,16 @@ static int __init dtc2278_probe(void)
#endif
local_irq_restore(flags);
- hwif->serialized = 1;
hwif->no_io_32bit = 1; /* disallow ->io_32bit changes */
- hwif->chipset = ide_dtc2278;
- hwif->pio_mask = ATA_PIO4;
hwif->set_pio_mode = &dtc2278_set_pio_mode;
hwif->drives[0].no_unmask = 1;
hwif->drives[1].no_unmask = 1;
- hwif->drives[0].io_32bit = 1;
- hwif->drives[1].io_32bit = 1;
- hwif->mate = mate;
- mate->serialized = 1;
mate->no_io_32bit = 1;
- mate->chipset = ide_dtc2278;
- mate->pio_mask = ATA_PIO4;
mate->drives[0].no_unmask = 1;
mate->drives[1].no_unmask = 1;
- mate->drives[0].io_32bit = 1;
- mate->drives[1].io_32bit = 1;
- mate->mate = hwif;
- mate->channel = 1;
- ide_device_add(idx);
+ ide_device_add(idx, &dtc2278_port_info);
return 0;
}