diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 16:25:24 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-26 16:25:24 -0400 |
commit | f37afdaca711838b50ecd89b9c15fc745270d77c (patch) | |
tree | 0580bdac04d7d9ef0cc9f4dc2350ea38141980b5 /drivers | |
parent | 5e37bdc081a980dd0d669e6387bcf15ca9666f81 (diff) |
ide: constify struct ide_dma_ops
* Export ide_dma_exec_cmd() and __ide_dma_test_irq().
* Constify struct ide_dma_ops.
* Always set hwif->dma_ops to &sff_dma_ops in ide_setup_dma()
(it is later overriden by ide_init_port() if needed) and drop
'const struct ide_port_info *d' argument.
While at it:
* Rename __ide_dma_test_irq() to ide_dma_test_irq().
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/ide/arm/icside.c | 2 | ||||
-rw-r--r-- | drivers/ide/arm/palm_bk3710.c | 2 | ||||
-rw-r--r-- | drivers/ide/cris/ide-cris.c | 4 | ||||
-rw-r--r-- | drivers/ide/ide-dma.c | 33 | ||||
-rw-r--r-- | drivers/ide/ide-taskfile.c | 2 | ||||
-rw-r--r-- | drivers/ide/mips/au1xxx-ide.c | 2 | ||||
-rw-r--r-- | drivers/ide/pci/alim15x3.c | 11 | ||||
-rw-r--r-- | drivers/ide/pci/cmd64x.c | 25 | ||||
-rw-r--r-- | drivers/ide/pci/cs5520.c | 9 | ||||
-rw-r--r-- | drivers/ide/pci/hpt366.c | 26 | ||||
-rw-r--r-- | drivers/ide/pci/ns87415.c | 8 | ||||
-rw-r--r-- | drivers/ide/pci/pdc202xx_old.c | 12 | ||||
-rw-r--r-- | drivers/ide/pci/sc1200.c | 9 | ||||
-rw-r--r-- | drivers/ide/pci/scc_pata.c | 7 | ||||
-rw-r--r-- | drivers/ide/pci/sgiioc4.c | 2 | ||||
-rw-r--r-- | drivers/ide/pci/sl82c105.c | 6 | ||||
-rw-r--r-- | drivers/ide/pci/tc86c001.c | 9 | ||||
-rw-r--r-- | drivers/ide/pci/trm290.c | 2 | ||||
-rw-r--r-- | drivers/ide/ppc/pmac.c | 4 | ||||
-rw-r--r-- | drivers/ide/setup-pci.c | 2 |
20 files changed, 125 insertions, 52 deletions
diff --git a/drivers/ide/arm/icside.c b/drivers/ide/arm/icside.c index adfeed45f4c0..7d642f44e35b 100644 --- a/drivers/ide/arm/icside.c +++ b/drivers/ide/arm/icside.c | |||
@@ -392,7 +392,7 @@ static int icside_dma_init(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
392 | return 0; | 392 | return 0; |
393 | } | 393 | } |
394 | 394 | ||
395 | static struct ide_dma_ops icside_v6_dma_ops = { | 395 | static const struct ide_dma_ops icside_v6_dma_ops = { |
396 | .dma_host_set = icside_dma_host_set, | 396 | .dma_host_set = icside_dma_host_set, |
397 | .dma_setup = icside_dma_setup, | 397 | .dma_setup = icside_dma_setup, |
398 | .dma_exec_cmd = icside_dma_exec_cmd, | 398 | .dma_exec_cmd = icside_dma_exec_cmd, |
diff --git a/drivers/ide/arm/palm_bk3710.c b/drivers/ide/arm/palm_bk3710.c index 5853f1109807..8fa34e26443a 100644 --- a/drivers/ide/arm/palm_bk3710.c +++ b/drivers/ide/arm/palm_bk3710.c | |||
@@ -328,7 +328,7 @@ static int __devinit palm_bk3710_init_dma(ide_hwif_t *hwif, | |||
328 | if (ide_allocate_dma_engine(hwif)) | 328 | if (ide_allocate_dma_engine(hwif)) |
329 | return -1; | 329 | return -1; |
330 | 330 | ||
331 | ide_setup_dma(hwif, base, d); | 331 | ide_setup_dma(hwif, base); |
332 | 332 | ||
333 | return 0; | 333 | return 0; |
334 | } | 334 | } |
diff --git a/drivers/ide/cris/ide-cris.c b/drivers/ide/cris/ide-cris.c index 12d9842dc7cc..a62ca75c7e28 100644 --- a/drivers/ide/cris/ide-cris.c +++ b/drivers/ide/cris/ide-cris.c | |||
@@ -782,7 +782,7 @@ static const struct ide_port_ops cris_port_ops = { | |||
782 | .set_dma_mode = cris_set_dma_mode, | 782 | .set_dma_mode = cris_set_dma_mode, |
783 | }; | 783 | }; |
784 | 784 | ||
785 | static struct ide_dma_ops cris_dma_ops; | 785 | static const struct ide_dma_ops cris_dma_ops; |
786 | 786 | ||
787 | static const struct ide_port_info cris_port_info __initdata = { | 787 | static const struct ide_port_info cris_port_info __initdata = { |
788 | .chipset = ide_etrax100, | 788 | .chipset = ide_etrax100, |
@@ -1072,7 +1072,7 @@ static void cris_dma_start(ide_drive_t *drive) | |||
1072 | } | 1072 | } |
1073 | } | 1073 | } |
1074 | 1074 | ||
1075 | static struct ide_dma_ops cris_dma_ops = { | 1075 | static const struct ide_dma_ops cris_dma_ops = { |
1076 | .dma_host_set = cris_dma_host_set, | 1076 | .dma_host_set = cris_dma_host_set, |
1077 | .dma_setup = cris_dma_setup, | 1077 | .dma_setup = cris_dma_setup, |
1078 | .dma_exec_cmd = cris_dma_exec_cmd, | 1078 | .dma_exec_cmd = cris_dma_exec_cmd, |
diff --git a/drivers/ide/ide-dma.c b/drivers/ide/ide-dma.c index a00d2598ec7f..c352cf27b6e7 100644 --- a/drivers/ide/ide-dma.c +++ b/drivers/ide/ide-dma.c | |||
@@ -482,11 +482,12 @@ int ide_dma_setup(ide_drive_t *drive) | |||
482 | 482 | ||
483 | EXPORT_SYMBOL_GPL(ide_dma_setup); | 483 | EXPORT_SYMBOL_GPL(ide_dma_setup); |
484 | 484 | ||
485 | static void ide_dma_exec_cmd(ide_drive_t *drive, u8 command) | 485 | void ide_dma_exec_cmd(ide_drive_t *drive, u8 command) |
486 | { | 486 | { |
487 | /* issue cmd to drive */ | 487 | /* issue cmd to drive */ |
488 | ide_execute_command(drive, command, &ide_dma_intr, 2*WAIT_CMD, dma_timer_expiry); | 488 | ide_execute_command(drive, command, &ide_dma_intr, 2*WAIT_CMD, dma_timer_expiry); |
489 | } | 489 | } |
490 | EXPORT_SYMBOL_GPL(ide_dma_exec_cmd); | ||
490 | 491 | ||
491 | void ide_dma_start(ide_drive_t *drive) | 492 | void ide_dma_start(ide_drive_t *drive) |
492 | { | 493 | { |
@@ -532,7 +533,7 @@ int __ide_dma_end (ide_drive_t *drive) | |||
532 | EXPORT_SYMBOL(__ide_dma_end); | 533 | EXPORT_SYMBOL(__ide_dma_end); |
533 | 534 | ||
534 | /* returns 1 if dma irq issued, 0 otherwise */ | 535 | /* returns 1 if dma irq issued, 0 otherwise */ |
535 | static int __ide_dma_test_irq(ide_drive_t *drive) | 536 | int ide_dma_test_irq(ide_drive_t *drive) |
536 | { | 537 | { |
537 | ide_hwif_t *hwif = HWIF(drive); | 538 | ide_hwif_t *hwif = HWIF(drive); |
538 | u8 dma_stat = hwif->INB(hwif->dma_status); | 539 | u8 dma_stat = hwif->INB(hwif->dma_status); |
@@ -545,6 +546,7 @@ static int __ide_dma_test_irq(ide_drive_t *drive) | |||
545 | drive->name, __func__); | 546 | drive->name, __func__); |
546 | return 0; | 547 | return 0; |
547 | } | 548 | } |
549 | EXPORT_SYMBOL_GPL(ide_dma_test_irq); | ||
548 | #else | 550 | #else |
549 | static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } | 551 | static inline int config_drive_for_dma(ide_drive_t *drive) { return 0; } |
550 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ | 552 | #endif /* CONFIG_BLK_DEV_IDEDMA_SFF */ |
@@ -839,21 +841,19 @@ int ide_allocate_dma_engine(ide_hwif_t *hwif) | |||
839 | } | 841 | } |
840 | EXPORT_SYMBOL_GPL(ide_allocate_dma_engine); | 842 | EXPORT_SYMBOL_GPL(ide_allocate_dma_engine); |
841 | 843 | ||
842 | static struct ide_dma_ops sff_dma_ops = { | 844 | static const struct ide_dma_ops sff_dma_ops = { |
843 | .dma_host_set = ide_dma_host_set, | 845 | .dma_host_set = ide_dma_host_set, |
844 | .dma_setup = ide_dma_setup, | 846 | .dma_setup = ide_dma_setup, |
845 | .dma_exec_cmd = ide_dma_exec_cmd, | 847 | .dma_exec_cmd = ide_dma_exec_cmd, |
846 | .dma_start = ide_dma_start, | 848 | .dma_start = ide_dma_start, |
847 | .dma_end = __ide_dma_end, | 849 | .dma_end = __ide_dma_end, |
848 | .dma_test_irq = __ide_dma_test_irq, | 850 | .dma_test_irq = ide_dma_test_irq, |
849 | .dma_timeout = ide_dma_timeout, | 851 | .dma_timeout = ide_dma_timeout, |
850 | .dma_lost_irq = ide_dma_lost_irq, | 852 | .dma_lost_irq = ide_dma_lost_irq, |
851 | }; | 853 | }; |
852 | 854 | ||
853 | void ide_setup_dma(ide_hwif_t *hwif, unsigned long base, | 855 | void ide_setup_dma(ide_hwif_t *hwif, unsigned long base) |
854 | const struct ide_port_info *d) | ||
855 | { | 856 | { |
856 | struct ide_dma_ops *dma_ops = d->dma_ops ? d->dma_ops : &sff_dma_ops; | ||
857 | hwif->dma_base = base; | 857 | hwif->dma_base = base; |
858 | 858 | ||
859 | if (!hwif->dma_command) | 859 | if (!hwif->dma_command) |
@@ -867,24 +867,7 @@ void ide_setup_dma(ide_hwif_t *hwif, unsigned long base, | |||
867 | if (!hwif->dma_prdtable) | 867 | if (!hwif->dma_prdtable) |
868 | hwif->dma_prdtable = hwif->dma_base + 4; | 868 | hwif->dma_prdtable = hwif->dma_base + 4; |
869 | 869 | ||
870 | hwif->dma_ops = dma_ops; | 870 | hwif->dma_ops = &sff_dma_ops; |
871 | |||
872 | if (dma_ops->dma_host_set == NULL) | ||
873 | dma_ops->dma_host_set = ide_dma_host_set; | ||
874 | if (dma_ops->dma_setup == NULL) | ||
875 | dma_ops->dma_setup = ide_dma_setup; | ||
876 | if (dma_ops->dma_exec_cmd == NULL) | ||
877 | dma_ops->dma_exec_cmd = ide_dma_exec_cmd; | ||
878 | if (dma_ops->dma_start == NULL) | ||
879 | dma_ops->dma_start = ide_dma_start; | ||
880 | if (dma_ops->dma_end == NULL) | ||
881 | dma_ops->dma_end = __ide_dma_end; | ||
882 | if (dma_ops->dma_test_irq == NULL) | ||
883 | dma_ops->dma_test_irq = __ide_dma_test_irq; | ||
884 | if (dma_ops->dma_timeout == NULL) | ||
885 | dma_ops->dma_timeout = ide_dma_timeout; | ||
886 | if (dma_ops->dma_lost_irq == NULL) | ||
887 | dma_ops->dma_lost_irq = ide_dma_lost_irq; | ||
888 | } | 871 | } |
889 | 872 | ||
890 | EXPORT_SYMBOL_GPL(ide_setup_dma); | 873 | EXPORT_SYMBOL_GPL(ide_setup_dma); |
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c index 9504aa54c33b..a317ca9c46e5 100644 --- a/drivers/ide/ide-taskfile.c +++ b/drivers/ide/ide-taskfile.c | |||
@@ -135,7 +135,7 @@ ide_startstop_t do_rw_taskfile (ide_drive_t *drive, ide_task_t *task) | |||
135 | ide_hwif_t *hwif = HWIF(drive); | 135 | ide_hwif_t *hwif = HWIF(drive); |
136 | struct ide_taskfile *tf = &task->tf; | 136 | struct ide_taskfile *tf = &task->tf; |
137 | ide_handler_t *handler = NULL; | 137 | ide_handler_t *handler = NULL; |
138 | struct ide_dma_ops *dma_ops = hwif->dma_ops; | 138 | const struct ide_dma_ops *dma_ops = hwif->dma_ops; |
139 | 139 | ||
140 | if (task->data_phase == TASKFILE_MULTI_IN || | 140 | if (task->data_phase == TASKFILE_MULTI_IN || |
141 | task->data_phase == TASKFILE_MULTI_OUT) { | 141 | task->data_phase == TASKFILE_MULTI_OUT) { |
diff --git a/drivers/ide/mips/au1xxx-ide.c b/drivers/ide/mips/au1xxx-ide.c index 579caa3b06f4..3485a310c95b 100644 --- a/drivers/ide/mips/au1xxx-ide.c +++ b/drivers/ide/mips/au1xxx-ide.c | |||
@@ -380,7 +380,7 @@ static void auide_dma_timeout(ide_drive_t *drive) | |||
380 | auide_dma_end(drive); | 380 | auide_dma_end(drive); |
381 | } | 381 | } |
382 | 382 | ||
383 | static struct ide_dma_ops au1xxx_dma_ops = { | 383 | static const struct ide_dma_ops au1xxx_dma_ops = { |
384 | .dma_host_set = auide_dma_host_set, | 384 | .dma_host_set = auide_dma_host_set, |
385 | .dma_setup = auide_dma_setup, | 385 | .dma_setup = auide_dma_setup, |
386 | .dma_exec_cmd = auide_dma_exec_cmd, | 386 | .dma_exec_cmd = auide_dma_exec_cmd, |
diff --git a/drivers/ide/pci/alim15x3.c b/drivers/ide/pci/alim15x3.c index 987db35199e6..b5a3bc33e167 100644 --- a/drivers/ide/pci/alim15x3.c +++ b/drivers/ide/pci/alim15x3.c | |||
@@ -731,7 +731,7 @@ static int __devinit init_dma_ali15x3(ide_hwif_t *hwif, | |||
731 | if (ide_allocate_dma_engine(hwif)) | 731 | if (ide_allocate_dma_engine(hwif)) |
732 | return -1; | 732 | return -1; |
733 | 733 | ||
734 | ide_setup_dma(hwif, base, d); | 734 | ide_setup_dma(hwif, base); |
735 | 735 | ||
736 | return 0; | 736 | return 0; |
737 | } | 737 | } |
@@ -743,8 +743,15 @@ static const struct ide_port_ops ali_port_ops = { | |||
743 | .cable_detect = ali_cable_detect, | 743 | .cable_detect = ali_cable_detect, |
744 | }; | 744 | }; |
745 | 745 | ||
746 | static struct ide_dma_ops ali_dma_ops = { | 746 | static const struct ide_dma_ops ali_dma_ops = { |
747 | .dma_host_set = ide_dma_host_set, | ||
747 | .dma_setup = ali15x3_dma_setup, | 748 | .dma_setup = ali15x3_dma_setup, |
749 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
750 | .dma_start = ide_dma_start, | ||
751 | .dma_end = __ide_dma_end, | ||
752 | .dma_test_irq = ide_dma_test_irq, | ||
753 | .dma_lost_irq = ide_dma_lost_irq, | ||
754 | .dma_timeout = ide_dma_timeout, | ||
748 | }; | 755 | }; |
749 | 756 | ||
750 | static const struct ide_port_info ali15x3_chipset __devinitdata = { | 757 | static const struct ide_port_info ali15x3_chipset __devinitdata = { |
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 5fd252e6ed08..006fb62656bc 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -391,18 +391,37 @@ static const struct ide_port_ops cmd64x_port_ops = { | |||
391 | .cable_detect = cmd64x_cable_detect, | 391 | .cable_detect = cmd64x_cable_detect, |
392 | }; | 392 | }; |
393 | 393 | ||
394 | static struct ide_dma_ops cmd64x_dma_ops = { | 394 | static const struct ide_dma_ops cmd64x_dma_ops = { |
395 | .dma_host_set = ide_dma_host_set, | ||
396 | .dma_setup = ide_dma_setup, | ||
397 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
398 | .dma_start = ide_dma_start, | ||
395 | .dma_end = cmd64x_dma_end, | 399 | .dma_end = cmd64x_dma_end, |
396 | .dma_test_irq = cmd64x_dma_test_irq, | 400 | .dma_test_irq = cmd64x_dma_test_irq, |
401 | .dma_lost_irq = ide_dma_lost_irq, | ||
402 | .dma_timeout = ide_dma_timeout, | ||
397 | }; | 403 | }; |
398 | 404 | ||
399 | static struct ide_dma_ops cmd646_rev1_dma_ops = { | 405 | static const struct ide_dma_ops cmd646_rev1_dma_ops = { |
406 | .dma_host_set = ide_dma_host_set, | ||
407 | .dma_setup = ide_dma_setup, | ||
408 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
409 | .dma_start = ide_dma_start, | ||
400 | .dma_end = cmd646_1_dma_end, | 410 | .dma_end = cmd646_1_dma_end, |
411 | .dma_test_irq = ide_dma_test_irq, | ||
412 | .dma_lost_irq = ide_dma_lost_irq, | ||
413 | .dma_timeout = ide_dma_timeout, | ||
401 | }; | 414 | }; |
402 | 415 | ||
403 | static struct ide_dma_ops cmd648_dma_ops = { | 416 | static const struct ide_dma_ops cmd648_dma_ops = { |
417 | .dma_host_set = ide_dma_host_set, | ||
418 | .dma_setup = ide_dma_setup, | ||
419 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
420 | .dma_start = ide_dma_start, | ||
404 | .dma_end = cmd648_dma_end, | 421 | .dma_end = cmd648_dma_end, |
405 | .dma_test_irq = cmd648_dma_test_irq, | 422 | .dma_test_irq = cmd648_dma_test_irq, |
423 | .dma_lost_irq = ide_dma_lost_irq, | ||
424 | .dma_timeout = ide_dma_timeout, | ||
406 | }; | 425 | }; |
407 | 426 | ||
408 | static const struct ide_port_info cmd64x_chipsets[] __devinitdata = { | 427 | static const struct ide_port_info cmd64x_chipsets[] __devinitdata = { |
diff --git a/drivers/ide/pci/cs5520.c b/drivers/ide/pci/cs5520.c index 467d331c8109..17669a434438 100644 --- a/drivers/ide/pci/cs5520.c +++ b/drivers/ide/pci/cs5520.c | |||
@@ -108,8 +108,15 @@ static const struct ide_port_ops cs5520_port_ops = { | |||
108 | .set_dma_mode = cs5520_set_dma_mode, | 108 | .set_dma_mode = cs5520_set_dma_mode, |
109 | }; | 109 | }; |
110 | 110 | ||
111 | static struct ide_dma_ops cs5520_dma_ops = { | 111 | static const struct ide_dma_ops cs5520_dma_ops = { |
112 | .dma_host_set = cs5520_dma_host_set, | 112 | .dma_host_set = cs5520_dma_host_set, |
113 | .dma_setup = ide_dma_setup, | ||
114 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
115 | .dma_start = ide_dma_start, | ||
116 | .dma_end = __ide_dma_end, | ||
117 | .dma_test_irq = ide_dma_test_irq, | ||
118 | .dma_lost_irq = ide_dma_lost_irq, | ||
119 | .dma_timeout = ide_dma_timeout, | ||
113 | }; | 120 | }; |
114 | 121 | ||
115 | #define DECLARE_CS_DEV(name_str) \ | 122 | #define DECLARE_CS_DEV(name_str) \ |
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 5030bda1adeb..8c02961d0188 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -1347,7 +1347,7 @@ static int __devinit init_dma_hpt366(ide_hwif_t *hwif, | |||
1347 | if (ide_allocate_dma_engine(hwif)) | 1347 | if (ide_allocate_dma_engine(hwif)) |
1348 | return -1; | 1348 | return -1; |
1349 | 1349 | ||
1350 | ide_setup_dma(hwif, base, d); | 1350 | ide_setup_dma(hwif, base); |
1351 | 1351 | ||
1352 | return 0; | 1352 | return 0; |
1353 | } | 1353 | } |
@@ -1415,19 +1415,37 @@ static const struct ide_port_ops hpt3xx_port_ops = { | |||
1415 | .cable_detect = hpt3xx_cable_detect, | 1415 | .cable_detect = hpt3xx_cable_detect, |
1416 | }; | 1416 | }; |
1417 | 1417 | ||
1418 | static struct ide_dma_ops hpt37x_dma_ops = { | 1418 | static const struct ide_dma_ops hpt37x_dma_ops = { |
1419 | .dma_host_set = ide_dma_host_set, | ||
1420 | .dma_setup = ide_dma_setup, | ||
1421 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
1422 | .dma_start = ide_dma_start, | ||
1419 | .dma_end = hpt374_dma_end, | 1423 | .dma_end = hpt374_dma_end, |
1420 | .dma_test_irq = hpt374_dma_test_irq, | 1424 | .dma_test_irq = hpt374_dma_test_irq, |
1425 | .dma_lost_irq = ide_dma_lost_irq, | ||
1426 | .dma_timeout = ide_dma_timeout, | ||
1421 | }; | 1427 | }; |
1422 | 1428 | ||
1423 | static struct ide_dma_ops hpt370_dma_ops = { | 1429 | static const struct ide_dma_ops hpt370_dma_ops = { |
1430 | .dma_host_set = ide_dma_host_set, | ||
1431 | .dma_setup = ide_dma_setup, | ||
1432 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
1424 | .dma_start = hpt370_dma_start, | 1433 | .dma_start = hpt370_dma_start, |
1425 | .dma_end = hpt370_dma_end, | 1434 | .dma_end = hpt370_dma_end, |
1435 | .dma_test_irq = ide_dma_test_irq, | ||
1436 | .dma_lost_irq = ide_dma_lost_irq, | ||
1426 | .dma_timeout = hpt370_dma_timeout, | 1437 | .dma_timeout = hpt370_dma_timeout, |
1427 | }; | 1438 | }; |
1428 | 1439 | ||
1429 | static struct ide_dma_ops hpt36x_dma_ops = { | 1440 | static const struct ide_dma_ops hpt36x_dma_ops = { |
1441 | .dma_host_set = ide_dma_host_set, | ||
1442 | .dma_setup = ide_dma_setup, | ||
1443 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
1444 | .dma_start = ide_dma_start, | ||
1445 | .dma_end = __ide_dma_end, | ||
1446 | .dma_test_irq = ide_dma_test_irq, | ||
1430 | .dma_lost_irq = hpt366_dma_lost_irq, | 1447 | .dma_lost_irq = hpt366_dma_lost_irq, |
1448 | .dma_timeout = ide_dma_timeout, | ||
1431 | }; | 1449 | }; |
1432 | 1450 | ||
1433 | static const struct ide_port_info hpt366_chipsets[] __devinitdata = { | 1451 | static const struct ide_port_info hpt366_chipsets[] __devinitdata = { |
diff --git a/drivers/ide/pci/ns87415.c b/drivers/ide/pci/ns87415.c index 5a6dec0e1f4d..e1b0c9a9ab9c 100644 --- a/drivers/ide/pci/ns87415.c +++ b/drivers/ide/pci/ns87415.c | |||
@@ -258,9 +258,15 @@ static const struct ide_port_ops ns87415_port_ops = { | |||
258 | .selectproc = ns87415_selectproc, | 258 | .selectproc = ns87415_selectproc, |
259 | }; | 259 | }; |
260 | 260 | ||
261 | static struct ide_dma_ops ns87415_dma_ops = { | 261 | static const struct ide_dma_ops ns87415_dma_ops = { |
262 | .dma_host_set = ide_dma_host_set, | ||
262 | .dma_setup = ns87415_dma_setup, | 263 | .dma_setup = ns87415_dma_setup, |
264 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
265 | .dma_start = ide_dma_start, | ||
263 | .dma_end = ns87415_dma_end, | 266 | .dma_end = ns87415_dma_end, |
267 | .dma_test_irq = ide_dma_test_irq, | ||
268 | .dma_lost_irq = ide_dma_lost_irq, | ||
269 | .dma_timeout = ide_dma_timeout, | ||
264 | }; | 270 | }; |
265 | 271 | ||
266 | static const struct ide_port_info ns87415_chipset __devinitdata = { | 272 | static const struct ide_port_info ns87415_chipset __devinitdata = { |
diff --git a/drivers/ide/pci/pdc202xx_old.c b/drivers/ide/pci/pdc202xx_old.c index 9c490fd63fde..fca89eda5c02 100644 --- a/drivers/ide/pci/pdc202xx_old.c +++ b/drivers/ide/pci/pdc202xx_old.c | |||
@@ -329,13 +329,21 @@ static const struct ide_port_ops pdc2026x_port_ops = { | |||
329 | .cable_detect = pdc2026x_cable_detect, | 329 | .cable_detect = pdc2026x_cable_detect, |
330 | }; | 330 | }; |
331 | 331 | ||
332 | static struct ide_dma_ops pdc20246_dma_ops = { | 332 | static const struct ide_dma_ops pdc20246_dma_ops = { |
333 | .dma_host_set = ide_dma_host_set, | ||
334 | .dma_setup = ide_dma_setup, | ||
335 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
336 | .dma_start = ide_dma_start, | ||
337 | .dma_end = __ide_dma_end, | ||
333 | .dma_test_irq = pdc202xx_dma_test_irq, | 338 | .dma_test_irq = pdc202xx_dma_test_irq, |
334 | .dma_lost_irq = pdc202xx_dma_lost_irq, | 339 | .dma_lost_irq = pdc202xx_dma_lost_irq, |
335 | .dma_timeout = pdc202xx_dma_timeout, | 340 | .dma_timeout = pdc202xx_dma_timeout, |
336 | }; | 341 | }; |
337 | 342 | ||
338 | static struct ide_dma_ops pdc2026x_dma_ops = { | 343 | static const struct ide_dma_ops pdc2026x_dma_ops = { |
344 | .dma_host_set = ide_dma_host_set, | ||
345 | .dma_setup = ide_dma_setup, | ||
346 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
339 | .dma_start = pdc202xx_dma_start, | 347 | .dma_start = pdc202xx_dma_start, |
340 | .dma_end = pdc202xx_dma_end, | 348 | .dma_end = pdc202xx_dma_end, |
341 | .dma_test_irq = pdc202xx_dma_test_irq, | 349 | .dma_test_irq = pdc202xx_dma_test_irq, |
diff --git a/drivers/ide/pci/sc1200.c b/drivers/ide/pci/sc1200.c index 303bcfb2a441..14c787b5d95f 100644 --- a/drivers/ide/pci/sc1200.c +++ b/drivers/ide/pci/sc1200.c | |||
@@ -292,8 +292,15 @@ static const struct ide_port_ops sc1200_port_ops = { | |||
292 | .udma_filter = sc1200_udma_filter, | 292 | .udma_filter = sc1200_udma_filter, |
293 | }; | 293 | }; |
294 | 294 | ||
295 | static struct ide_dma_ops sc1200_dma_ops = { | 295 | static const struct ide_dma_ops sc1200_dma_ops = { |
296 | .dma_host_set = ide_dma_host_set, | ||
297 | .dma_setup = ide_dma_setup, | ||
298 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
299 | .dma_start = ide_dma_start, | ||
296 | .dma_end = sc1200_dma_end, | 300 | .dma_end = sc1200_dma_end, |
301 | .dma_test_irq = ide_dma_test_irq, | ||
302 | .dma_lost_irq = ide_dma_lost_irq, | ||
303 | .dma_timeout = ide_dma_timeout, | ||
297 | }; | 304 | }; |
298 | 305 | ||
299 | static const struct ide_port_info sc1200_chipset __devinitdata = { | 306 | static const struct ide_port_info sc1200_chipset __devinitdata = { |
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index 5117c11134cd..17cf86490d59 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -705,10 +705,15 @@ static const struct ide_port_ops scc_port_ops = { | |||
705 | .cable_detect = scc_cable_detect, | 705 | .cable_detect = scc_cable_detect, |
706 | }; | 706 | }; |
707 | 707 | ||
708 | static struct ide_dma_ops scc_dma_ops = { | 708 | static const struct ide_dma_ops scc_dma_ops = { |
709 | .dma_host_set = ide_dma_host_set, | ||
709 | .dma_setup = scc_dma_setup, | 710 | .dma_setup = scc_dma_setup, |
711 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
712 | .dma_start = ide_dma_start, | ||
710 | .dma_end = scc_dma_end, | 713 | .dma_end = scc_dma_end, |
711 | .dma_test_irq = scc_dma_test_irq, | 714 | .dma_test_irq = scc_dma_test_irq, |
715 | .dma_lost_irq = ide_dma_lost_irq, | ||
716 | .dma_timeout = ide_dma_timeout, | ||
712 | }; | 717 | }; |
713 | 718 | ||
714 | #define DECLARE_SCC_DEV(name_str) \ | 719 | #define DECLARE_SCC_DEV(name_str) \ |
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 2cbb7fd1ddec..321a4e28ac19 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -558,7 +558,7 @@ static const struct ide_port_ops sgiioc4_port_ops = { | |||
558 | .maskproc = sgiioc4_maskproc, | 558 | .maskproc = sgiioc4_maskproc, |
559 | }; | 559 | }; |
560 | 560 | ||
561 | static struct ide_dma_ops sgiioc4_dma_ops = { | 561 | static const struct ide_dma_ops sgiioc4_dma_ops = { |
562 | .dma_host_set = sgiioc4_dma_host_set, | 562 | .dma_host_set = sgiioc4_dma_host_set, |
563 | .dma_setup = sgiioc4_dma_setup, | 563 | .dma_setup = sgiioc4_dma_setup, |
564 | .dma_start = sgiioc4_dma_start, | 564 | .dma_start = sgiioc4_dma_start, |
diff --git a/drivers/ide/pci/sl82c105.c b/drivers/ide/pci/sl82c105.c index 635d607bc0cf..ce84fa045d39 100644 --- a/drivers/ide/pci/sl82c105.c +++ b/drivers/ide/pci/sl82c105.c | |||
@@ -288,9 +288,13 @@ static const struct ide_port_ops sl82c105_port_ops = { | |||
288 | .resetproc = sl82c105_resetproc, | 288 | .resetproc = sl82c105_resetproc, |
289 | }; | 289 | }; |
290 | 290 | ||
291 | static struct ide_dma_ops sl82c105_dma_ops = { | 291 | static const struct ide_dma_ops sl82c105_dma_ops = { |
292 | .dma_host_set = ide_dma_host_set, | ||
293 | .dma_setup = ide_dma_setup, | ||
294 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
292 | .dma_start = sl82c105_dma_start, | 295 | .dma_start = sl82c105_dma_start, |
293 | .dma_end = sl82c105_dma_end, | 296 | .dma_end = sl82c105_dma_end, |
297 | .dma_test_irq = ide_dma_test_irq, | ||
294 | .dma_lost_irq = sl82c105_dma_lost_irq, | 298 | .dma_lost_irq = sl82c105_dma_lost_irq, |
295 | .dma_timeout = sl82c105_dma_timeout, | 299 | .dma_timeout = sl82c105_dma_timeout, |
296 | }; | 300 | }; |
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c index 4ce240db3263..9b4b27a4c711 100644 --- a/drivers/ide/pci/tc86c001.c +++ b/drivers/ide/pci/tc86c001.c | |||
@@ -186,8 +186,15 @@ static const struct ide_port_ops tc86c001_port_ops = { | |||
186 | .cable_detect = tc86c001_cable_detect, | 186 | .cable_detect = tc86c001_cable_detect, |
187 | }; | 187 | }; |
188 | 188 | ||
189 | static struct ide_dma_ops tc86c001_dma_ops = { | 189 | static const struct ide_dma_ops tc86c001_dma_ops = { |
190 | .dma_host_set = ide_dma_host_set, | ||
191 | .dma_setup = ide_dma_setup, | ||
192 | .dma_exec_cmd = ide_dma_exec_cmd, | ||
190 | .dma_start = tc86c001_dma_start, | 193 | .dma_start = tc86c001_dma_start, |
194 | .dma_end = __ide_dma_end, | ||
195 | .dma_test_irq = ide_dma_test_irq, | ||
196 | .dma_lost_irq = ide_dma_lost_irq, | ||
197 | .dma_timeout = ide_dma_timeout, | ||
191 | }; | 198 | }; |
192 | 199 | ||
193 | static const struct ide_port_info tc86c001_chipset __devinitdata = { | 200 | static const struct ide_port_info tc86c001_chipset __devinitdata = { |
diff --git a/drivers/ide/pci/trm290.c b/drivers/ide/pci/trm290.c index c506e97cd716..15ee38f7ad3f 100644 --- a/drivers/ide/pci/trm290.c +++ b/drivers/ide/pci/trm290.c | |||
@@ -320,6 +320,8 @@ static struct ide_dma_ops trm290_dma_ops = { | |||
320 | .dma_start = trm290_dma_start, | 320 | .dma_start = trm290_dma_start, |
321 | .dma_end = trm290_dma_end, | 321 | .dma_end = trm290_dma_end, |
322 | .dma_test_irq = trm290_dma_test_irq, | 322 | .dma_test_irq = trm290_dma_test_irq, |
323 | .dma_lost_irq = ide_dma_lost_irq, | ||
324 | .dma_timeout = ide_dma_timeout, | ||
323 | }; | 325 | }; |
324 | 326 | ||
325 | static const struct ide_port_info trm290_chipset __devinitdata = { | 327 | static const struct ide_port_info trm290_chipset __devinitdata = { |
diff --git a/drivers/ide/ppc/pmac.c b/drivers/ide/ppc/pmac.c index 0ee16acfdf29..185faa0dce94 100644 --- a/drivers/ide/ppc/pmac.c +++ b/drivers/ide/ppc/pmac.c | |||
@@ -930,7 +930,7 @@ static const struct ide_port_ops pmac_ide_port_ops = { | |||
930 | .selectproc = pmac_ide_selectproc, | 930 | .selectproc = pmac_ide_selectproc, |
931 | }; | 931 | }; |
932 | 932 | ||
933 | static struct ide_dma_ops pmac_dma_ops; | 933 | static const struct ide_dma_ops pmac_dma_ops; |
934 | 934 | ||
935 | static const struct ide_port_info pmac_port_info = { | 935 | static const struct ide_port_info pmac_port_info = { |
936 | .init_dma = pmac_ide_init_dma, | 936 | .init_dma = pmac_ide_init_dma, |
@@ -1675,7 +1675,7 @@ pmac_ide_dma_lost_irq (ide_drive_t *drive) | |||
1675 | printk(KERN_ERR "ide-pmac lost interrupt, dma status: %lx\n", status); | 1675 | printk(KERN_ERR "ide-pmac lost interrupt, dma status: %lx\n", status); |
1676 | } | 1676 | } |
1677 | 1677 | ||
1678 | static struct ide_dma_ops pmac_dma_ops = { | 1678 | static const struct ide_dma_ops pmac_dma_ops = { |
1679 | .dma_host_set = pmac_ide_dma_host_set, | 1679 | .dma_host_set = pmac_ide_dma_host_set, |
1680 | .dma_setup = pmac_ide_dma_setup, | 1680 | .dma_setup = pmac_ide_dma_setup, |
1681 | .dma_exec_cmd = pmac_ide_dma_exec_cmd, | 1681 | .dma_exec_cmd = pmac_ide_dma_exec_cmd, |
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c index 9a1e01e176f0..5171601fb255 100644 --- a/drivers/ide/setup-pci.c +++ b/drivers/ide/setup-pci.c | |||
@@ -385,7 +385,7 @@ int ide_hwif_setup_dma(ide_hwif_t *hwif, const struct ide_port_info *d) | |||
385 | if (ide_allocate_dma_engine(hwif)) | 385 | if (ide_allocate_dma_engine(hwif)) |
386 | return -1; | 386 | return -1; |
387 | 387 | ||
388 | ide_setup_dma(hwif, base, d); | 388 | ide_setup_dma(hwif, base); |
389 | } | 389 | } |
390 | 390 | ||
391 | return 0; | 391 | return 0; |