aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-cd.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:26 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-04-17 18:46:26 -0400
commit23579a2a170265aacf78069f4817a41c1d6e9323 (patch)
treea20db3f337b64b13e482a2cb2f41e03b13d52e66 /drivers/ide/ide-cd.c
parent7616c0ad2087c7d244b8985390c63059a6223c45 (diff)
ide: remove IDE_*_REG macros
* Add IDE_{ALTSTATUS,IREASON,BCOUNTL,BCOUNTH}_OFFSET defines. * Remove IDE_*_REG macros - this results in more readable and slightly smaller code. There should be no functional changes caused by this patch. Cc: Borislav Petkov <petkovbb@gmail.com> Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-cd.c')
-rw-r--r--drivers/ide/ide-cd.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c
index c8d0e8715997..396000208f81 100644
--- a/drivers/ide/ide-cd.c
+++ b/drivers/ide/ide-cd.c
@@ -542,7 +542,8 @@ static ide_startstop_t cdrom_start_packet_command(ide_drive_t *drive,
542 542
543 /* packet command */ 543 /* packet command */
544 spin_lock_irqsave(&ide_lock, flags); 544 spin_lock_irqsave(&ide_lock, flags);
545 hwif->OUTBSYNC(drive, WIN_PACKETCMD, IDE_COMMAND_REG); 545 hwif->OUTBSYNC(drive, WIN_PACKETCMD,
546 hwif->io_ports[IDE_COMMAND_OFFSET]);
546 ndelay(400); 547 ndelay(400);
547 spin_unlock_irqrestore(&ide_lock, flags); 548 spin_unlock_irqrestore(&ide_lock, flags);
548 549
@@ -992,6 +993,7 @@ static int cdrom_newpc_intr_dummy_cb(struct request *rq)
992 993
993static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive) 994static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
994{ 995{
996 ide_hwif_t *hwif = drive->hwif;
995 struct cdrom_info *info = drive->driver_data; 997 struct cdrom_info *info = drive->driver_data;
996 struct request *rq = HWGROUP(drive)->rq; 998 struct request *rq = HWGROUP(drive)->rq;
997 xfer_func_t *xferfunc; 999 xfer_func_t *xferfunc;
@@ -1032,9 +1034,9 @@ static ide_startstop_t cdrom_newpc_intr(ide_drive_t *drive)
1032 /* 1034 /*
1033 * ok we fall to pio :/ 1035 * ok we fall to pio :/
1034 */ 1036 */
1035 ireason = HWIF(drive)->INB(IDE_IREASON_REG) & 0x3; 1037 ireason = hwif->INB(hwif->io_ports[IDE_IREASON_OFFSET]) & 0x3;
1036 lowcyl = HWIF(drive)->INB(IDE_BCOUNTL_REG); 1038 lowcyl = hwif->INB(hwif->io_ports[IDE_BCOUNTL_OFFSET]);
1037 highcyl = HWIF(drive)->INB(IDE_BCOUNTH_REG); 1039 highcyl = hwif->INB(hwif->io_ports[IDE_BCOUNTH_OFFSET]);
1038 1040
1039 len = lowcyl + (256 * highcyl); 1041 len = lowcyl + (256 * highcyl);
1040 1042