diff options
author | David Hardeman <david@2gen.com> | 2005-09-17 17:55:31 +1000 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2005-10-30 11:19:43 +1100 |
commit | 378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c (patch) | |
tree | ed99548aa459054c7b046f0ac96af2cc50683e6e /drivers/scsi/arm | |
parent | d32311fed70d12f14e585feb4653571b1e2b0e6d (diff) |
[PATCH] Use sg_set_buf/sg_init_one where applicable
This patch uses sg_set_buf/sg_init_one in some places where it was
duplicated.
Signed-off-by: David Hardeman <david@2gen.com>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Greg KH <greg@kroah.com>
Cc: "David S. Miller" <davem@davemloft.net>
Cc: Jeff Garzik <jgarzik@pobox.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/scsi/arm')
-rw-r--r-- | drivers/scsi/arm/scsi.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h index 48e1c4d9738..19937640e2e 100644 --- a/drivers/scsi/arm/scsi.h +++ b/drivers/scsi/arm/scsi.h @@ -10,6 +10,8 @@ * Commonly used scsi driver functions. */ +#include <linux/scatterlist.h> + #define BELT_AND_BRACES /* @@ -22,9 +24,7 @@ static inline int copy_SCp_to_sg(struct scatterlist *sg, Scsi_Pointer *SCp, int BUG_ON(bufs + 1 > max); - sg->page = virt_to_page(SCp->ptr); - sg->offset = offset_in_page(SCp->ptr); - sg->length = SCp->this_residual; + sg_set_buf(sg, SCp->ptr, SCp->this_residual); if (bufs) memcpy(sg + 1, SCp->buffer + 1, |