aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/legacy/ht6560b.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:14 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:14 -0400
commitac95beedf8bc97b24f9540d4da9952f07221c023 (patch)
treec29837142c8083b6fcaf1767abcb0a4533676cd1 /drivers/ide/legacy/ht6560b.c
parent4a27214d7be31e122db4102166f49ec15958e8e9 (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/legacy/ht6560b.c')
-rw-r--r--drivers/ide/legacy/ht6560b.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/drivers/ide/legacy/ht6560b.c b/drivers/ide/legacy/ht6560b.c
index 60f52f5158c9..9d45ed3bffaa 100644
--- a/drivers/ide/legacy/ht6560b.c
+++ b/drivers/ide/legacy/ht6560b.c
@@ -328,8 +328,15 @@ int probe_ht6560b = 0;
328module_param_named(probe, probe_ht6560b, bool, 0); 328module_param_named(probe, probe_ht6560b, bool, 0);
329MODULE_PARM_DESC(probe, "probe for HT6560B chipset"); 329MODULE_PARM_DESC(probe, "probe for HT6560B chipset");
330 330
331static const struct ide_port_ops ht6560b_port_ops = {
332 .port_init_devs = ht6560b_port_init_devs,
333 .set_pio_mode = ht6560b_set_pio_mode,
334 .selectproc = ht6560b_selectproc,
335};
336
331static const struct ide_port_info ht6560b_port_info __initdata = { 337static const struct ide_port_info ht6560b_port_info __initdata = {
332 .chipset = ide_ht6560b, 338 .chipset = ide_ht6560b,
339 .port_ops = &ht6560b_port_ops,
333 .host_flags = IDE_HFLAG_SERIALIZE | /* is this needed? */ 340 .host_flags = IDE_HFLAG_SERIALIZE | /* is this needed? */
334 IDE_HFLAG_NO_DMA | 341 IDE_HFLAG_NO_DMA |
335 IDE_HFLAG_NO_AUTOTUNE | 342 IDE_HFLAG_NO_AUTOTUNE |
@@ -368,18 +375,12 @@ static int __init ht6560b_init(void)
368 hwif = ide_find_port(); 375 hwif = ide_find_port();
369 if (hwif) { 376 if (hwif) {
370 ide_init_port_hw(hwif, &hw[0]); 377 ide_init_port_hw(hwif, &hw[0]);
371 hwif->selectproc = ht6560b_selectproc;
372 hwif->set_pio_mode = ht6560b_set_pio_mode;
373 hwif->port_init_devs = ht6560b_port_init_devs;
374 idx[0] = hwif->index; 378 idx[0] = hwif->index;
375 } 379 }
376 380
377 mate = ide_find_port(); 381 mate = ide_find_port();
378 if (mate) { 382 if (mate) {
379 ide_init_port_hw(mate, &hw[1]); 383 ide_init_port_hw(mate, &hw[1]);
380 mate->selectproc = ht6560b_selectproc;
381 mate->set_pio_mode = ht6560b_set_pio_mode;
382 mate->port_init_devs = ht6560b_port_init_devs;
383 idx[1] = mate->index; 384 idx[1] = mate->index;
384 } 385 }
385 386