aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/pci/scc_pata.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 11:36:34 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-26 11:36:34 -0400
commit589b06262021f8d52847c9389acf26e95c6b3732 (patch)
tree35eefd506b4c34c24752bd411a2251302ade8724 /drivers/ide/pci/scc_pata.c
parent84f05df49a7376037f8b9fa1135df5a08cc32070 (diff)
scc_pata: store 'hwif' pointer in struct scc_ports
Replace 'unsigned char hwif_id' by 'ide_hwif_t *hwif' in struct scc_ports. This allows us to remove ide_hwifs[] usage from scc_remove(). There should be no functional changes caused by this patch. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/pci/scc_pata.c')
-rw-r--r--drivers/ide/pci/scc_pata.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c
index 80c553faa8ad..0d1e4fc86ca6 100644
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -65,7 +65,7 @@
65 65
66static struct scc_ports { 66static struct scc_ports {
67 unsigned long ctl, dma; 67 unsigned long ctl, dma;
68 unsigned char hwif_id; /* for removing hwif from system */ 68 ide_hwif_t *hwif; /* for removing port from system */
69} scc_ports[MAX_HWIFS]; 69} scc_ports[MAX_HWIFS];
70 70
71/* PIO transfer mode table */ 71/* PIO transfer mode table */
@@ -692,7 +692,7 @@ static void __devinit init_hwif_scc(ide_hwif_t *hwif)
692{ 692{
693 struct scc_ports *ports = ide_get_hwifdata(hwif); 693 struct scc_ports *ports = ide_get_hwifdata(hwif);
694 694
695 ports->hwif_id = hwif->index; 695 ports->hwif = hwif;
696 696
697 hwif->dma_command = hwif->dma_base; 697 hwif->dma_command = hwif->dma_base;
698 hwif->dma_status = hwif->dma_base + 0x04; 698 hwif->dma_status = hwif->dma_base + 0x04;
@@ -754,7 +754,7 @@ static int __devinit scc_init_one(struct pci_dev *dev, const struct pci_device_i
754static void __devexit scc_remove(struct pci_dev *dev) 754static void __devexit scc_remove(struct pci_dev *dev)
755{ 755{
756 struct scc_ports *ports = pci_get_drvdata(dev); 756 struct scc_ports *ports = pci_get_drvdata(dev);
757 ide_hwif_t *hwif = &ide_hwifs[ports->hwif_id]; 757 ide_hwif_t *hwif = ports->hwif;
758 unsigned long ctl_base = pci_resource_start(dev, 0); 758 unsigned long ctl_base = pci_resource_start(dev, 0);
759 unsigned long dma_base = pci_resource_start(dev, 1); 759 unsigned long dma_base = pci_resource_start(dev, 1);
760 unsigned long ctl_size = pci_resource_len(dev, 0); 760 unsigned long ctl_size = pci_resource_len(dev, 0);