aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ide/ide-taskfile.c
diff options
context:
space:
mode:
authorBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-05 20:57:51 -0500
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-02-05 20:57:51 -0500
commit64a57fe4393bae920d03c253173f59d8a7ec8e25 (patch)
treebfbac6fa370401d519a6fd9433a330dd55efe68d /drivers/ide/ide-taskfile.c
parentc47137a99c597330b69057158b26061a360c0e09 (diff)
ide: add ide_read_error() inline helper
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'drivers/ide/ide-taskfile.c')
-rw-r--r--drivers/ide/ide-taskfile.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/ide/ide-taskfile.c b/drivers/ide/ide-taskfile.c
index 2545dde6ee02..0518a2e948cf 100644
--- a/drivers/ide/ide-taskfile.c
+++ b/drivers/ide/ide-taskfile.c
@@ -241,7 +241,6 @@ static ide_startstop_t recal_intr(ide_drive_t *drive)
241static ide_startstop_t task_no_data_intr(ide_drive_t *drive) 241static ide_startstop_t task_no_data_intr(ide_drive_t *drive)
242{ 242{
243 ide_task_t *args = HWGROUP(drive)->rq->special; 243 ide_task_t *args = HWGROUP(drive)->rq->special;
244 ide_hwif_t *hwif = HWIF(drive);
245 u8 stat; 244 u8 stat;
246 245
247 local_irq_enable_in_hardirq(); 246 local_irq_enable_in_hardirq();
@@ -252,7 +251,7 @@ static ide_startstop_t task_no_data_intr(ide_drive_t *drive)
252 /* calls ide_end_drive_cmd */ 251 /* calls ide_end_drive_cmd */
253 252
254 if (args) 253 if (args)
255 ide_end_drive_cmd(drive, stat, hwif->INB(IDE_ERROR_REG)); 254 ide_end_drive_cmd(drive, stat, ide_read_error(drive));
256 255
257 return ide_stopped; 256 return ide_stopped;
258} 257}
@@ -408,7 +407,7 @@ static ide_startstop_t task_error(ide_drive_t *drive, struct request *rq,
408void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat) 407void task_end_request(ide_drive_t *drive, struct request *rq, u8 stat)
409{ 408{
410 if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) { 409 if (rq->cmd_type == REQ_TYPE_ATA_TASKFILE) {
411 u8 err = drive->hwif->INB(IDE_ERROR_REG); 410 u8 err = ide_read_error(drive);
412 411
413 ide_end_drive_cmd(drive, stat, err); 412 ide_end_drive_cmd(drive, stat, err);
414 return; 413 return;