]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - drivers/ide/pci/tc86c001.c
ide: add struct ide_port_ops (take 2)
[mirror_ubuntu-zesty-kernel.git] / drivers / ide / pci / tc86c001.c
index c15435182e3c33273805ce3ba7cb307a6ad873f2..14ce400a0eafb07a2a58f6eab02de9b522bae3bc 100644 (file)
@@ -157,11 +157,6 @@ static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif)
        /* Store the system control register base for convenience... */
        hwif->config_data = sc_base;
 
-       hwif->set_pio_mode = &tc86c001_set_pio_mode;
-       hwif->set_dma_mode = &tc86c001_set_mode;
-
-       hwif->cable_detect = tc86c001_cable_detect;
-
        if (!hwif->dma_base)
                return;
 
@@ -187,10 +182,17 @@ static unsigned int __devinit init_chipset_tc86c001(struct pci_dev *dev,
        return err;
 }
 
+static const struct ide_port_ops tc86c001_port_ops = {
+       .set_pio_mode           = tc86c001_set_pio_mode,
+       .set_dma_mode           = tc86c001_set_mode,
+       .cable_detect           = tc86c001_cable_detect,
+};
+
 static const struct ide_port_info tc86c001_chipset __devinitdata = {
        .name           = "TC86C001",
        .init_chipset   = init_chipset_tc86c001,
        .init_hwif      = init_hwif_tc86c001,
+       .port_ops       = &tc86c001_port_ops,
        .host_flags     = IDE_HFLAG_SINGLE | IDE_HFLAG_OFF_BOARD |
                          IDE_HFLAG_ABUSE_SET_DMA_MODE,
        .pio_mask       = ATA_PIO4,