diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 16:25:14 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 16:25:14 -0400 |
commit | ac95beedf8bc97b24f9540d4da9952f07221c023 (patch) | |
tree | c29837142c8083b6fcaf1767abcb0a4533676cd1 /drivers/ide/pci/tc86c001.c | |
parent | 4a27214d7be31e122db4102166f49ec15958e8e9 (diff) |
ide: add struct ide_port_ops (take 2)
* Move hooks for port/host specific methods from ide_hwif_t to
'struct ide_port_ops'.
* Add 'const struct ide_port_ops *port_ops' to 'struct ide_port_info'
and ide_hwif_t.
* Update host drivers and core code accordingly.
While at it:
* Rename ata66_*() cable detect functions to *_cable_detect() to match
the standard naming. (Suggested by Sergei Shtylyov)
v2:
* Fix build for bast-ide. (Noticed by Andrew Morton)
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/tc86c001.c')
-rw-r--r-- | drivers/ide/pci/tc86c001.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c index c15435182e3c..14ce400a0eaf 100644 --- a/drivers/ide/pci/tc86c001.c +++ b/drivers/ide/pci/tc86c001.c | |||
@@ -157,11 +157,6 @@ static void __devinit init_hwif_tc86c001(ide_hwif_t *hwif) | |||
157 | /* Store the system control register base for convenience... */ | 157 | /* Store the system control register base for convenience... */ |
158 | hwif->config_data = sc_base; | 158 | hwif->config_data = sc_base; |
159 | 159 | ||
160 | hwif->set_pio_mode = &tc86c001_set_pio_mode; | ||
161 | hwif->set_dma_mode = &tc86c001_set_mode; | ||
162 | |||
163 | hwif->cable_detect = tc86c001_cable_detect; | ||
164 | |||
165 | if (!hwif->dma_base) | 160 | if (!hwif->dma_base) |
166 | return; | 161 | return; |
167 | 162 | ||
@@ -187,10 +182,17 @@ static unsigned int __devinit init_chipset_tc86c001(struct pci_dev *dev, | |||
187 | return err; | 182 | return err; |
188 | } | 183 | } |
189 | 184 | ||
185 | static const struct ide_port_ops tc86c001_port_ops = { | ||
186 | .set_pio_mode = tc86c001_set_pio_mode, | ||
187 | .set_dma_mode = tc86c001_set_mode, | ||
188 | .cable_detect = tc86c001_cable_detect, | ||
189 | }; | ||
190 | |||
190 | static const struct ide_port_info tc86c001_chipset __devinitdata = { | 191 | static const struct ide_port_info tc86c001_chipset __devinitdata = { |
191 | .name = "TC86C001", | 192 | .name = "TC86C001", |
192 | .init_chipset = init_chipset_tc86c001, | 193 | .init_chipset = init_chipset_tc86c001, |
193 | .init_hwif = init_hwif_tc86c001, | 194 | .init_hwif = init_hwif_tc86c001, |
195 | .port_ops = &tc86c001_port_ops, | ||
194 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_OFF_BOARD | | 196 | .host_flags = IDE_HFLAG_SINGLE | IDE_HFLAG_OFF_BOARD | |
195 | IDE_HFLAG_ABUSE_SET_DMA_MODE, | 197 | IDE_HFLAG_ABUSE_SET_DMA_MODE, |
196 | .pio_mask = ATA_PIO4, | 198 | .pio_mask = ATA_PIO4, |