diff options
Diffstat (limited to 'drivers/ata/pata_icside.c')
-rw-r--r-- | drivers/ata/pata_icside.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/ata/pata_icside.c b/drivers/ata/pata_icside.c index 842fe08a3c13..5b8586dac63b 100644 --- a/drivers/ata/pata_icside.c +++ b/drivers/ata/pata_icside.c | |||
@@ -224,6 +224,7 @@ static void pata_icside_bmdma_setup(struct ata_queued_cmd *qc) | |||
224 | struct pata_icside_state *state = ap->host->private_data; | 224 | struct pata_icside_state *state = ap->host->private_data; |
225 | struct scatterlist *sg, *rsg = state->sg; | 225 | struct scatterlist *sg, *rsg = state->sg; |
226 | unsigned int write = qc->tf.flags & ATA_TFLAG_WRITE; | 226 | unsigned int write = qc->tf.flags & ATA_TFLAG_WRITE; |
227 | unsigned int si; | ||
227 | 228 | ||
228 | /* | 229 | /* |
229 | * We are simplex; BUG if we try to fiddle with DMA | 230 | * We are simplex; BUG if we try to fiddle with DMA |
@@ -234,7 +235,7 @@ static void pata_icside_bmdma_setup(struct ata_queued_cmd *qc) | |||
234 | /* | 235 | /* |
235 | * Copy ATAs scattered sg list into a contiguous array of sg | 236 | * Copy ATAs scattered sg list into a contiguous array of sg |
236 | */ | 237 | */ |
237 | ata_for_each_sg(sg, qc) { | 238 | for_each_sg(qc->sg, sg, qc->n_elem, si) { |
238 | memcpy(rsg, sg, sizeof(*sg)); | 239 | memcpy(rsg, sg, sizeof(*sg)); |
239 | rsg++; | 240 | rsg++; |
240 | } | 241 | } |