aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_debug.c
diff options
context:
space:
mode:
authorJens Axboe <jens.axboe@oracle.com>2007-10-22 15:19:53 -0400
committerJens Axboe <jens.axboe@oracle.com>2007-10-22 15:19:53 -0400
commit45711f1af6eff1a6d010703b4862e0d2b9afd056 (patch)
tree3d0048f46e3df9d217d56127462ebe680348bd5a /drivers/scsi/scsi_debug.c
parent78c2f0b8c285c5305b3e67b0595200541e15eb43 (diff)
[SG] Update drivers to use sg helpers
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r--drivers/scsi/scsi_debug.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 72ee4c9cfb1a..46cae5a212de 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -625,7 +625,7 @@ static int fill_from_dev_buffer(struct scsi_cmnd * scp, unsigned char * arr,
625 scsi_for_each_sg(scp, sg, scp->use_sg, k) { 625 scsi_for_each_sg(scp, sg, scp->use_sg, k) {
626 if (active) { 626 if (active) {
627 kaddr = (unsigned char *) 627 kaddr = (unsigned char *)
628 kmap_atomic(sg->page, KM_USER0); 628 kmap_atomic(sg_page(sg), KM_USER0);
629 if (NULL == kaddr) 629 if (NULL == kaddr)
630 return (DID_ERROR << 16); 630 return (DID_ERROR << 16);
631 kaddr_off = (unsigned char *)kaddr + sg->offset; 631 kaddr_off = (unsigned char *)kaddr + sg->offset;
@@ -672,7 +672,7 @@ static int fetch_to_dev_buffer(struct scsi_cmnd * scp, unsigned char * arr,
672 sg = scsi_sglist(scp); 672 sg = scsi_sglist(scp);
673 req_len = fin = 0; 673 req_len = fin = 0;
674 for (k = 0; k < scp->use_sg; ++k, sg = sg_next(sg)) { 674 for (k = 0; k < scp->use_sg; ++k, sg = sg_next(sg)) {
675 kaddr = (unsigned char *)kmap_atomic(sg->page, KM_USER0); 675 kaddr = (unsigned char *)kmap_atomic(sg_page(sg), KM_USER0);
676 if (NULL == kaddr) 676 if (NULL == kaddr)
677 return -1; 677 return -1;
678 kaddr_off = (unsigned char *)kaddr + sg->offset; 678 kaddr_off = (unsigned char *)kaddr + sg->offset;