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_sis.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_sis.c')
-rw-r--r-- | drivers/ata/pata_sis.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index 3ed628670cd7..32be13ba5f06 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c | |||
@@ -565,7 +565,6 @@ static struct ata_port_operations sis_old_ops = { | |||
565 | }; | 565 | }; |
566 | 566 | ||
567 | static const struct ata_port_info sis_info = { | 567 | static const struct ata_port_info sis_info = { |
568 | .sht = &sis_sht, | ||
569 | .flags = ATA_FLAG_SLAVE_POSS, | 568 | .flags = ATA_FLAG_SLAVE_POSS, |
570 | .pio_mask = 0x1f, /* pio0-4 */ | 569 | .pio_mask = 0x1f, /* pio0-4 */ |
571 | .mwdma_mask = 0x07, | 570 | .mwdma_mask = 0x07, |
@@ -573,7 +572,6 @@ static const struct ata_port_info sis_info = { | |||
573 | .port_ops = &sis_old_ops, | 572 | .port_ops = &sis_old_ops, |
574 | }; | 573 | }; |
575 | static const struct ata_port_info sis_info33 = { | 574 | static const struct ata_port_info sis_info33 = { |
576 | .sht = &sis_sht, | ||
577 | .flags = ATA_FLAG_SLAVE_POSS, | 575 | .flags = ATA_FLAG_SLAVE_POSS, |
578 | .pio_mask = 0x1f, /* pio0-4 */ | 576 | .pio_mask = 0x1f, /* pio0-4 */ |
579 | .mwdma_mask = 0x07, | 577 | .mwdma_mask = 0x07, |
@@ -581,42 +579,36 @@ static const struct ata_port_info sis_info33 = { | |||
581 | .port_ops = &sis_old_ops, | 579 | .port_ops = &sis_old_ops, |
582 | }; | 580 | }; |
583 | static const struct ata_port_info sis_info66 = { | 581 | static const struct ata_port_info sis_info66 = { |
584 | .sht = &sis_sht, | ||
585 | .flags = ATA_FLAG_SLAVE_POSS, | 582 | .flags = ATA_FLAG_SLAVE_POSS, |
586 | .pio_mask = 0x1f, /* pio0-4 */ | 583 | .pio_mask = 0x1f, /* pio0-4 */ |
587 | .udma_mask = ATA_UDMA4, /* UDMA 66 */ | 584 | .udma_mask = ATA_UDMA4, /* UDMA 66 */ |
588 | .port_ops = &sis_66_ops, | 585 | .port_ops = &sis_66_ops, |
589 | }; | 586 | }; |
590 | static const struct ata_port_info sis_info100 = { | 587 | static const struct ata_port_info sis_info100 = { |
591 | .sht = &sis_sht, | ||
592 | .flags = ATA_FLAG_SLAVE_POSS, | 588 | .flags = ATA_FLAG_SLAVE_POSS, |
593 | .pio_mask = 0x1f, /* pio0-4 */ | 589 | .pio_mask = 0x1f, /* pio0-4 */ |
594 | .udma_mask = ATA_UDMA5, | 590 | .udma_mask = ATA_UDMA5, |
595 | .port_ops = &sis_100_ops, | 591 | .port_ops = &sis_100_ops, |
596 | }; | 592 | }; |
597 | static const struct ata_port_info sis_info100_early = { | 593 | static const struct ata_port_info sis_info100_early = { |
598 | .sht = &sis_sht, | ||
599 | .flags = ATA_FLAG_SLAVE_POSS, | 594 | .flags = ATA_FLAG_SLAVE_POSS, |
600 | .udma_mask = ATA_UDMA5, | 595 | .udma_mask = ATA_UDMA5, |
601 | .pio_mask = 0x1f, /* pio0-4 */ | 596 | .pio_mask = 0x1f, /* pio0-4 */ |
602 | .port_ops = &sis_66_ops, | 597 | .port_ops = &sis_66_ops, |
603 | }; | 598 | }; |
604 | static const struct ata_port_info sis_info133 = { | 599 | static const struct ata_port_info sis_info133 = { |
605 | .sht = &sis_sht, | ||
606 | .flags = ATA_FLAG_SLAVE_POSS, | 600 | .flags = ATA_FLAG_SLAVE_POSS, |
607 | .pio_mask = 0x1f, /* pio0-4 */ | 601 | .pio_mask = 0x1f, /* pio0-4 */ |
608 | .udma_mask = ATA_UDMA6, | 602 | .udma_mask = ATA_UDMA6, |
609 | .port_ops = &sis_133_ops, | 603 | .port_ops = &sis_133_ops, |
610 | }; | 604 | }; |
611 | const struct ata_port_info sis_info133_for_sata = { | 605 | const struct ata_port_info sis_info133_for_sata = { |
612 | .sht = &sis_sht, | ||
613 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, | 606 | .flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST, |
614 | .pio_mask = 0x1f, /* pio0-4 */ | 607 | .pio_mask = 0x1f, /* pio0-4 */ |
615 | .udma_mask = ATA_UDMA6, | 608 | .udma_mask = ATA_UDMA6, |
616 | .port_ops = &sis_133_for_sata_ops, | 609 | .port_ops = &sis_133_for_sata_ops, |
617 | }; | 610 | }; |
618 | static const struct ata_port_info sis_info133_early = { | 611 | static const struct ata_port_info sis_info133_early = { |
619 | .sht = &sis_sht, | ||
620 | .flags = ATA_FLAG_SLAVE_POSS, | 612 | .flags = ATA_FLAG_SLAVE_POSS, |
621 | .pio_mask = 0x1f, /* pio0-4 */ | 613 | .pio_mask = 0x1f, /* pio0-4 */ |
622 | .udma_mask = ATA_UDMA6, | 614 | .udma_mask = ATA_UDMA6, |
@@ -844,7 +836,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
844 | 836 | ||
845 | sis_fixup(pdev, chipset); | 837 | sis_fixup(pdev, chipset); |
846 | 838 | ||
847 | return ata_pci_init_one(pdev, ppi); | 839 | return ata_pci_init_one(pdev, ppi, &sis_sht); |
848 | } | 840 | } |
849 | 841 | ||
850 | static const struct pci_device_id sis_pci_tbl[] = { | 842 | static const struct pci_device_id sis_pci_tbl[] = { |