ide-atapi: use local sense buffer

Access the sense buffer through the bio in ->pc_callback method thus
alleviating the need for the pc->buf pointer.

There should be no functional change resulting from this patch.

Signed-off-by: Borislav Petkov <petkovbb@gmail.com>
This commit is contained in:
Borislav Petkov
2009-05-02 10:58:17 +02:00
parent 5122e5174f
commit ae3a8387be
3 changed files with 8 additions and 4 deletions

View File

@@ -253,7 +253,9 @@ void ide_retry_pc(ide_drive_t *drive)
/* init pc from sense_rq */
ide_init_pc(pc);
memcpy(pc->c, sense_rq->cmd, 12);
pc->buf = bio_data(sense_rq->bio); /* pointer to mapped address */
/* pointer to mapped address */
pc->buf = bio_data(sense_rq->bio);
pc->req_xfer = blk_rq_bytes(sense_rq);
if (drive->media == ide_tape)