aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 18:32:33 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2007-10-19 18:32:33 -0400
commit9239b333939dd1e5b1a9f033a1c136273d58efe8 (patch)
treec7eb49e04a549ea709cd98ddf6df66a091a062d6 /drivers/ide/ide.c
parent18e181fe13b7340194d09e6dd7f571a5f96f0367 (diff)
ide: remove write-only hwif->hw
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide.c')
-rw-r--r--drivers/ide/ide.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/ide/ide.c b/drivers/ide/ide.c
index b7e872e29f9c..674a65c1a130 100644
--- a/drivers/ide/ide.c
+++ b/drivers/ide/ide.c
@@ -168,7 +168,6 @@ static void init_hwif_default(ide_hwif_t *hwif, unsigned int index)
168 168
169 ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, &hwif->irq); 169 ide_init_hwif_ports(&hw, ide_default_io_base(index), 0, &hwif->irq);
170 170
171 memcpy(&hwif->hw, &hw, sizeof(hw));
172 memcpy(hwif->io_ports, hw.io_ports, sizeof(hw.io_ports)); 171 memcpy(hwif->io_ports, hw.io_ports, sizeof(hw.io_ports));
173 172
174 hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET]; 173 hwif->noprobe = !hwif->io_ports[IDE_DATA_OFFSET];
@@ -214,7 +213,7 @@ static void __init init_ide_data (void)
214 init_hwif_data(hwif, index); 213 init_hwif_data(hwif, index);
215 init_hwif_default(hwif, index); 214 init_hwif_default(hwif, index);
216#if !defined(CONFIG_PPC32) || !defined(CONFIG_PCI) 215#if !defined(CONFIG_PPC32) || !defined(CONFIG_PCI)
217 hwif->irq = hwif->hw.irq = 216 hwif->irq =
218 ide_init_default_irq(hwif->io_ports[IDE_DATA_OFFSET]); 217 ide_init_default_irq(hwif->io_ports[IDE_DATA_OFFSET]);
219#endif 218#endif
220 } 219 }
@@ -730,8 +729,7 @@ found:
730 } 729 }
731 if (hwif->present) 730 if (hwif->present)
732 return -1; 731 return -1;
733 memcpy(&hwif->hw, hw, sizeof(*hw)); 732 memcpy(hwif->io_ports, hw->io_ports, sizeof(hwif->io_ports));
734 memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->hw.io_ports));
735 hwif->irq = hw->irq; 733 hwif->irq = hw->irq;
736 hwif->noprobe = 0; 734 hwif->noprobe = 0;
737 hwif->fixup = fixup; 735 hwif->fixup = fixup;
@@ -1417,6 +1415,9 @@ static int __init ide_setup(char *s)
1417 "reset", "minus6", "ata66", "minus8", "minus9", 1415 "reset", "minus6", "ata66", "minus8", "minus9",
1418 "minus10", "four", "qd65xx", "ht6560b", "cmd640_vlb", 1416 "minus10", "four", "qd65xx", "ht6560b", "cmd640_vlb",
1419 "dtc2278", "umc8672", "ali14xx", NULL }; 1417 "dtc2278", "umc8672", "ali14xx", NULL };
1418
1419 hw_regs_t hwregs;
1420
1420 hw = s[3] - '0'; 1421 hw = s[3] - '0';
1421 hwif = &ide_hwifs[hw]; 1422 hwif = &ide_hwifs[hw];
1422 i = match_parm(&s[4], ide_words, vals, 3); 1423 i = match_parm(&s[4], ide_words, vals, 3);
@@ -1526,9 +1527,9 @@ static int __init ide_setup(char *s)
1526 case 2: /* base,ctl */ 1527 case 2: /* base,ctl */
1527 vals[2] = 0; /* default irq = probe for it */ 1528 vals[2] = 0; /* default irq = probe for it */
1528 case 3: /* base,ctl,irq */ 1529 case 3: /* base,ctl,irq */
1529 hwif->hw.irq = vals[2]; 1530 memset(&hwregs, 0, sizeof(hwregs));
1530 ide_init_hwif_ports(&hwif->hw, (unsigned long) vals[0], (unsigned long) vals[1], &hwif->irq); 1531 ide_init_hwif_ports(&hwregs, vals[0], vals[1], &hwif->irq);
1531 memcpy(hwif->io_ports, hwif->hw.io_ports, sizeof(hwif->io_ports)); 1532 memcpy(hwif->io_ports, hwregs.io_ports, sizeof(hwif->io_ports));
1532 hwif->irq = vals[2]; 1533 hwif->irq = vals[2];
1533 hwif->noprobe = 0; 1534 hwif->noprobe = 0;
1534 hwif->chipset = ide_forced; 1535 hwif->chipset = ide_forced;