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/ns87415.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/ns87415.c')
-rw-r--r-- | drivers/ide/pci/ns87415.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index 3015d6916d4c..332de832f171 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c | |||
@@ -195,8 +195,6 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) | |||
195 | u8 stat; | 195 | u8 stat; |
196 | #endif | 196 | #endif |
197 | 197 | ||
198 | hwif->selectproc = &ns87415_selectproc; | ||
199 | |||
200 | /* | 198 | /* |
201 | * We cannot probe for IRQ: both ports share common IRQ on INTA. | 199 | * We cannot probe for IRQ: both ports share common IRQ on INTA. |
202 | * Also, leave IRQ masked during drive probing, to prevent infinite | 200 | * Also, leave IRQ masked during drive probing, to prevent infinite |
@@ -258,12 +256,17 @@ static void __devinit init_hwif_ns87415 (ide_hwif_t *hwif) | |||
258 | hwif->ide_dma_end = &ns87415_ide_dma_end; | 256 | hwif->ide_dma_end = &ns87415_ide_dma_end; |
259 | } | 257 | } |
260 | 258 | ||
259 | static const struct ide_port_ops ns87415_port_ops = { | ||
260 | .selectproc = ns87415_selectproc, | ||
261 | }; | ||
262 | |||
261 | static const struct ide_port_info ns87415_chipset __devinitdata = { | 263 | static const struct ide_port_info ns87415_chipset __devinitdata = { |
262 | .name = "NS87415", | 264 | .name = "NS87415", |
263 | #ifdef CONFIG_SUPERIO | 265 | #ifdef CONFIG_SUPERIO |
264 | .init_iops = init_iops_ns87415, | 266 | .init_iops = init_iops_ns87415, |
265 | #endif | 267 | #endif |
266 | .init_hwif = init_hwif_ns87415, | 268 | .init_hwif = init_hwif_ns87415, |
269 | .port_ops = &ns87415_port_ops, | ||
267 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | | 270 | .host_flags = IDE_HFLAG_TRUST_BIOS_FOR_DMA | |
268 | IDE_HFLAG_NO_ATAPI_DMA, | 271 | IDE_HFLAG_NO_ATAPI_DMA, |
269 | }; | 272 | }; |