aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:24 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 16:25:24 -0400
commitf37afdaca711838b50ecd89b9c15fc745270d77c (patch)
tree0580bdac04d7d9ef0cc9f4dc2350ea38141980b5 /drivers/ide/pci
parent5e37bdc081a980dd0d669e6387bcf15ca9666f81 (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/ide/pci')
-rw-r--r--drivers/ide/pci/alim15x3.c11
-rw-r--r--drivers/ide/pci/cmd64x.c25
-rw-r--r--drivers/ide/pci/cs5520.c9
-rw-r--r--drivers/ide/pci/hpt366.c26
-rw-r--r--drivers/ide/pci/ns87415.c8
-rw-r--r--drivers/ide/pci/pdc202xx_old.c12
-rw-r--r--drivers/ide/pci/sc1200.c9
-rw-r--r--drivers/ide/pci/scc_pata.c7
-rw-r--r--drivers/ide/pci/sgiioc4.c2
-rw-r--r--drivers/ide/pci/sl82c105.c6
-rw-r--r--drivers/ide/pci/tc86c001.c9
-rw-r--r--drivers/ide/pci/trm290.c2
12 files changed, 108 insertions, 18 deletions
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
746static struct ide_dma_ops ali_dma_ops = { 746static 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
750static const struct ide_port_info ali15x3_chipset __devinitdata = { 757static 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
394static struct ide_dma_ops cmd64x_dma_ops = { 394static 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
399static struct ide_dma_ops cmd646_rev1_dma_ops = { 405static 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
403static struct ide_dma_ops cmd648_dma_ops = { 416static 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
408static const struct ide_port_info cmd64x_chipsets[] __devinitdata = { 427static 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
111static struct ide_dma_ops cs5520_dma_ops = { 111static 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
1418static struct ide_dma_ops hpt37x_dma_ops = { 1418static 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
1423static struct ide_dma_ops hpt370_dma_ops = { 1429static 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
1429static struct ide_dma_ops hpt36x_dma_ops = { 1440static 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
1433static const struct ide_port_info hpt366_chipsets[] __devinitdata = { 1451static 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
261static struct ide_dma_ops ns87415_dma_ops = { 261static 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
266static const struct ide_port_info ns87415_chipset __devinitdata = { 272static 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
332static struct ide_dma_ops pdc20246_dma_ops = { 332static 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
338static struct ide_dma_ops pdc2026x_dma_ops = { 343static 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
295static struct ide_dma_ops sc1200_dma_ops = { 295static 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
299static const struct ide_port_info sc1200_chipset __devinitdata = { 306static 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
708static struct ide_dma_ops scc_dma_ops = { 708static 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
561static struct ide_dma_ops sgiioc4_dma_ops = { 561static 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
291static struct ide_dma_ops sl82c105_dma_ops = { 291static 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
189static struct ide_dma_ops tc86c001_dma_ops = { 189static 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
193static const struct ide_port_info tc86c001_chipset __devinitdata = { 200static 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
325static const struct ide_port_info trm290_chipset __devinitdata = { 327static const struct ide_port_info trm290_chipset __devinitdata = {