diff options
author | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-27 09:38:32 -0400 |
---|---|---|
committer | Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> | 2008-04-27 09:38:32 -0400 |
commit | 4c3032d8a4d6c97bd6e02bcab524ef2428d89561 (patch) | |
tree | 4528851a9b04282f602cebb6b2ab4bc677b63259 /drivers/ide/ide-cd.c | |
parent | 387750c3bf49c22f6189436032145e2131985076 (diff) |
ide: add struct ide_io_ports (take 3)
* Add struct ide_io_ports and use it instead of `unsigned long io_ports[]`
in ide_hwif_t.
* Rename io_ports[] in hw_regs_t to io_ports_array[].
* Use un-named union for 'unsigned long io_ports_array[]' and 'struct
ide_io_ports io_ports' in hw_regs_t.
* Remove IDE_*_OFFSET defines.
v2:
* scc_pata.c build fix from Stephen Rothwell.
v3:
* Fix ctl_adrr typo in Sparc-specific part of ns87415.c.
(Noticed by Andrew Morton)
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r-- | drivers/ide/ide-cd.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 164adc3a48a2..b34fd2bde96f 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -560,7 +560,7 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive, | |||
560 | /* packet command */ | 560 | /* packet command */ |
561 | spin_lock_irqsave(&ide_lock, flags); | 561 | spin_lock_irqsave(&ide_lock, flags); |
562 | hwif->OUTBSYNC(drive, WIN_PACKETCMD, | 562 | hwif->OUTBSYNC(drive, WIN_PACKETCMD, |
563 | hwif->io_ports[IDE_COMMAND_OFFSET]); | 563 | hwif->io_ports.command_addr); |
564 | ndelay(400); | 564 | ndelay(400); |
565 | spin_unlock_irqrestore(&ide_lock, flags); | 565 | spin_unlock_irqrestore(&ide_lock, flags); |
566 | 566 | ||
@@ -952,9 +952,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) | |||
952 | } | 952 | } |
953 | 953 | ||
954 | /* ok we fall to pio :/ */ | 954 | /* ok we fall to pio :/ */ |
955 | ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]) & 0x3; | 955 | ireason = hwif->INB(hwif->io_ports.nsect_addr) & 0x3; |
956 | lowcyl = hwif->INB(hwif->io_ports[IDE_BCOUNTL_OFFSET]); | 956 | lowcyl = hwif->INB(hwif->io_ports.lbam_addr); |
957 | highcyl = hwif->INB(hwif->io_ports[IDE_BCOUNTH_OFFSET]); | 957 | highcyl = hwif->INB(hwif->io_ports.lbah_addr); |
958 | 958 | ||
959 | len = lowcyl + (256 * highcyl); | 959 | len = lowcyl + (256 * highcyl); |
960 | 960 | ||