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_hpt37x.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_hpt37x.c')
-rw-r--r-- | drivers/ata/pata_hpt37x.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index c42eec70d297..a43c19753669 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c | |||
@@ -783,7 +783,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
783 | { | 783 | { |
784 | /* HPT370 - UDMA100 */ | 784 | /* HPT370 - UDMA100 */ |
785 | static const struct ata_port_info info_hpt370 = { | 785 | static const struct ata_port_info info_hpt370 = { |
786 | .sht = &hpt37x_sht, | ||
787 | .flags = ATA_FLAG_SLAVE_POSS, | 786 | .flags = ATA_FLAG_SLAVE_POSS, |
788 | .pio_mask = 0x1f, | 787 | .pio_mask = 0x1f, |
789 | .mwdma_mask = 0x07, | 788 | .mwdma_mask = 0x07, |
@@ -792,7 +791,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
792 | }; | 791 | }; |
793 | /* HPT370A - UDMA100 */ | 792 | /* HPT370A - UDMA100 */ |
794 | static const struct ata_port_info info_hpt370a = { | 793 | static const struct ata_port_info info_hpt370a = { |
795 | .sht = &hpt37x_sht, | ||
796 | .flags = ATA_FLAG_SLAVE_POSS, | 794 | .flags = ATA_FLAG_SLAVE_POSS, |
797 | .pio_mask = 0x1f, | 795 | .pio_mask = 0x1f, |
798 | .mwdma_mask = 0x07, | 796 | .mwdma_mask = 0x07, |
@@ -801,7 +799,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
801 | }; | 799 | }; |
802 | /* HPT370 - UDMA100 */ | 800 | /* HPT370 - UDMA100 */ |
803 | static const struct ata_port_info info_hpt370_33 = { | 801 | static const struct ata_port_info info_hpt370_33 = { |
804 | .sht = &hpt37x_sht, | ||
805 | .flags = ATA_FLAG_SLAVE_POSS, | 802 | .flags = ATA_FLAG_SLAVE_POSS, |
806 | .pio_mask = 0x1f, | 803 | .pio_mask = 0x1f, |
807 | .mwdma_mask = 0x07, | 804 | .mwdma_mask = 0x07, |
@@ -810,7 +807,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
810 | }; | 807 | }; |
811 | /* HPT370A - UDMA100 */ | 808 | /* HPT370A - UDMA100 */ |
812 | static const struct ata_port_info info_hpt370a_33 = { | 809 | static const struct ata_port_info info_hpt370a_33 = { |
813 | .sht = &hpt37x_sht, | ||
814 | .flags = ATA_FLAG_SLAVE_POSS, | 810 | .flags = ATA_FLAG_SLAVE_POSS, |
815 | .pio_mask = 0x1f, | 811 | .pio_mask = 0x1f, |
816 | .mwdma_mask = 0x07, | 812 | .mwdma_mask = 0x07, |
@@ -819,7 +815,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
819 | }; | 815 | }; |
820 | /* HPT371, 372 and friends - UDMA133 */ | 816 | /* HPT371, 372 and friends - UDMA133 */ |
821 | static const struct ata_port_info info_hpt372 = { | 817 | static const struct ata_port_info info_hpt372 = { |
822 | .sht = &hpt37x_sht, | ||
823 | .flags = ATA_FLAG_SLAVE_POSS, | 818 | .flags = ATA_FLAG_SLAVE_POSS, |
824 | .pio_mask = 0x1f, | 819 | .pio_mask = 0x1f, |
825 | .mwdma_mask = 0x07, | 820 | .mwdma_mask = 0x07, |
@@ -828,7 +823,6 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
828 | }; | 823 | }; |
829 | /* HPT374 - UDMA100 */ | 824 | /* HPT374 - UDMA100 */ |
830 | static const struct ata_port_info info_hpt374 = { | 825 | static const struct ata_port_info info_hpt374 = { |
831 | .sht = &hpt37x_sht, | ||
832 | .flags = ATA_FLAG_SLAVE_POSS, | 826 | .flags = ATA_FLAG_SLAVE_POSS, |
833 | .pio_mask = 0x1f, | 827 | .pio_mask = 0x1f, |
834 | .mwdma_mask = 0x07, | 828 | .mwdma_mask = 0x07, |
@@ -1051,7 +1045,7 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
1051 | port_info = *port; | 1045 | port_info = *port; |
1052 | port_info.private_data = private_data; | 1046 | port_info.private_data = private_data; |
1053 | 1047 | ||
1054 | return ata_pci_init_one(dev, ppi); | 1048 | return ata_pci_init_one(dev, ppi, &hpt37x_sht); |
1055 | } | 1049 | } |
1056 | 1050 | ||
1057 | static const struct pci_device_id hpt37x[] = { | 1051 | static const struct pci_device_id hpt37x[] = { |