diff options
author | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 15:19:53 -0400 |
---|---|---|
committer | Jens Axboe <jens.axboe@oracle.com> | 2007-10-22 15:19:53 -0400 |
commit | 45711f1af6eff1a6d010703b4862e0d2b9afd056 (patch) | |
tree | 3d0048f46e3df9d217d56127462ebe680348bd5a /drivers/scsi/ps3rom.c | |
parent | 78c2f0b8c285c5305b3e67b0595200541e15eb43 (diff) |
[SG] Update drivers to use sg helpers
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi/ps3rom.c')
-rw-r--r-- | drivers/scsi/ps3rom.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/ps3rom.c b/drivers/scsi/ps3rom.c index 0f43d1d046d9..03f19b8d19c9 100644 --- a/drivers/scsi/ps3rom.c +++ b/drivers/scsi/ps3rom.c | |||
@@ -111,14 +111,14 @@ static int fill_from_dev_buffer(struct scsi_cmnd *cmd, const void *buf) | |||
111 | req_len = act_len = 0; | 111 | req_len = act_len = 0; |
112 | scsi_for_each_sg(cmd, sgpnt, scsi_sg_count(cmd), k) { | 112 | scsi_for_each_sg(cmd, sgpnt, scsi_sg_count(cmd), k) { |
113 | if (active) { | 113 | if (active) { |
114 | kaddr = kmap_atomic(sgpnt->page, KM_IRQ0); | 114 | kaddr = kmap_atomic(sg_page(sgpnt), KM_IRQ0); |
115 | len = sgpnt->length; | 115 | len = sgpnt->length; |
116 | if ((req_len + len) > buflen) { | 116 | if ((req_len + len) > buflen) { |
117 | active = 0; | 117 | active = 0; |
118 | len = buflen - req_len; | 118 | len = buflen - req_len; |
119 | } | 119 | } |
120 | memcpy(kaddr + sgpnt->offset, buf + req_len, len); | 120 | memcpy(kaddr + sgpnt->offset, buf + req_len, len); |
121 | flush_kernel_dcache_page(sgpnt->page); | 121 | flush_kernel_dcache_page(sg_page(sgpnt)); |
122 | kunmap_atomic(kaddr, KM_IRQ0); | 122 | kunmap_atomic(kaddr, KM_IRQ0); |
123 | act_len += len; | 123 | act_len += len; |
124 | } | 124 | } |
@@ -147,7 +147,7 @@ static int fetch_to_dev_buffer(struct scsi_cmnd *cmd, void *buf) | |||
147 | 147 | ||
148 | req_len = fin = 0; | 148 | req_len = fin = 0; |
149 | scsi_for_each_sg(cmd, sgpnt, scsi_sg_count(cmd), k) { | 149 | scsi_for_each_sg(cmd, sgpnt, scsi_sg_count(cmd), k) { |
150 | kaddr = kmap_atomic(sgpnt->page, KM_IRQ0); | 150 | kaddr = kmap_atomic(sg_page(sgpnt->page), KM_IRQ0); |
151 | len = sgpnt->length; | 151 | len = sgpnt->length; |
152 | if ((req_len + len) > buflen) { | 152 | if ((req_len + len) > buflen) { |
153 | len = buflen - req_len; | 153 | len = buflen - req_len; |