diff options
author | Tejun Heo <htejun@gmail.com> | 2008-03-24 23:22:49 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-17 15:44:17 -0400 |
commit | 1bd5b715a305f6f13455e89becbd839010dd14b5 (patch) | |
tree | 22e74b38495c51cda92145b7ae31f504f80d9fd3 /drivers/ata/pata_ali.c | |
parent | 029cfd6b74fc5c517865fad78cf4a3ea8d9b664a (diff) |
libata: make ata_pci_init_one() not use ops->irq_handler and pi->sht
ata_pci_init_one() is the only function which uses ops->irq_handler
and pi->sht. Other initialization functions take the same information
as arguments. This causes confusion and duplicate unused entries in
structures.
Make ata_pci_init_one() take sht as an argument and use ata_interrupt
implicitly. All current users use ata_interrupt and if different irq
handler is necessary open coding ata_pci_init_one() using
ata_prepare_sff_host() and ata_activate_sff_host can be done under ten
lines including error handling and driver which requires custom
interrupt handler is likely to require custom initialization anyway.
As ata_pci_init_one() was the last user of ops->irq_handler, this
patch also kills the field.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Diffstat (limited to 'drivers/ata/pata_ali.c')
-rw-r--r-- | drivers/ata/pata_ali.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index b00a9cf72c31..f2924996f6e3 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c | |||
@@ -463,14 +463,12 @@ static void ali_init_chipset(struct pci_dev *pdev) | |||
463 | static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | 463 | static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) |
464 | { | 464 | { |
465 | static const struct ata_port_info info_early = { | 465 | static const struct ata_port_info info_early = { |
466 | .sht = &ali_sht, | ||
467 | .flags = ATA_FLAG_SLAVE_POSS, | 466 | .flags = ATA_FLAG_SLAVE_POSS, |
468 | .pio_mask = 0x1f, | 467 | .pio_mask = 0x1f, |
469 | .port_ops = &ali_early_port_ops | 468 | .port_ops = &ali_early_port_ops |
470 | }; | 469 | }; |
471 | /* Revision 0x20 added DMA */ | 470 | /* Revision 0x20 added DMA */ |
472 | static const struct ata_port_info info_20 = { | 471 | static const struct ata_port_info info_20 = { |
473 | .sht = &ali_sht, | ||
474 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, | 472 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, |
475 | .pio_mask = 0x1f, | 473 | .pio_mask = 0x1f, |
476 | .mwdma_mask = 0x07, | 474 | .mwdma_mask = 0x07, |
@@ -478,7 +476,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
478 | }; | 476 | }; |
479 | /* Revision 0x20 with support logic added UDMA */ | 477 | /* Revision 0x20 with support logic added UDMA */ |
480 | static const struct ata_port_info info_20_udma = { | 478 | static const struct ata_port_info info_20_udma = { |
481 | .sht = &ali_sht, | ||
482 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, | 479 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, |
483 | .pio_mask = 0x1f, | 480 | .pio_mask = 0x1f, |
484 | .mwdma_mask = 0x07, | 481 | .mwdma_mask = 0x07, |
@@ -487,7 +484,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
487 | }; | 484 | }; |
488 | /* Revision 0xC2 adds UDMA66 */ | 485 | /* Revision 0xC2 adds UDMA66 */ |
489 | static const struct ata_port_info info_c2 = { | 486 | static const struct ata_port_info info_c2 = { |
490 | .sht = &ali_sht, | ||
491 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, | 487 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, |
492 | .pio_mask = 0x1f, | 488 | .pio_mask = 0x1f, |
493 | .mwdma_mask = 0x07, | 489 | .mwdma_mask = 0x07, |
@@ -496,7 +492,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
496 | }; | 492 | }; |
497 | /* Revision 0xC3 is UDMA66 for now */ | 493 | /* Revision 0xC3 is UDMA66 for now */ |
498 | static const struct ata_port_info info_c3 = { | 494 | static const struct ata_port_info info_c3 = { |
499 | .sht = &ali_sht, | ||
500 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, | 495 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, |
501 | .pio_mask = 0x1f, | 496 | .pio_mask = 0x1f, |
502 | .mwdma_mask = 0x07, | 497 | .mwdma_mask = 0x07, |
@@ -505,7 +500,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
505 | }; | 500 | }; |
506 | /* Revision 0xC4 is UDMA100 */ | 501 | /* Revision 0xC4 is UDMA100 */ |
507 | static const struct ata_port_info info_c4 = { | 502 | static const struct ata_port_info info_c4 = { |
508 | .sht = &ali_sht, | ||
509 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, | 503 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_PIO_LBA48, |
510 | .pio_mask = 0x1f, | 504 | .pio_mask = 0x1f, |
511 | .mwdma_mask = 0x07, | 505 | .mwdma_mask = 0x07, |
@@ -514,7 +508,6 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
514 | }; | 508 | }; |
515 | /* Revision 0xC5 is UDMA133 with LBA48 DMA */ | 509 | /* Revision 0xC5 is UDMA133 with LBA48 DMA */ |
516 | static const struct ata_port_info info_c5 = { | 510 | static const struct ata_port_info info_c5 = { |
517 | .sht = &ali_sht, | ||
518 | .flags = ATA_FLAG_SLAVE_POSS, | 511 | .flags = ATA_FLAG_SLAVE_POSS, |
519 | .pio_mask = 0x1f, | 512 | .pio_mask = 0x1f, |
520 | .mwdma_mask = 0x07, | 513 | .mwdma_mask = 0x07, |
@@ -559,7 +552,7 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
559 | ppi[0] = &info_20_udma; | 552 | ppi[0] = &info_20_udma; |
560 | pci_dev_put(isa_bridge); | 553 | pci_dev_put(isa_bridge); |
561 | } | 554 | } |
562 | return ata_pci_init_one(pdev, ppi); | 555 | return ata_pci_init_one(pdev, ppi, &ali_sht); |
563 | } | 556 | } |
564 | 557 | ||
565 | #ifdef CONFIG_PM | 558 | #ifdef CONFIG_PM |