summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/arm
diff options
context:
space:
mode:
authorDavid Hardeman <david@2gen.com>2005-09-17 09:55:31 +0200
committerHerbert Xu <herbert@gondor.apana.org.au>2005-10-30 02:19:43 +0200
commit378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c (patch)
treeed99548aa459054c7b046f0ac96af2cc50683e6e /drivers/scsi/arm
parent[PATCH] Introduce sg_set_buf (diff)
downloadlinux-378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c.tar.xz
linux-378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c.zip
[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.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/scsi/arm/scsi.h b/drivers/scsi/arm/scsi.h
index 48e1c4d9738b..19937640e2e7 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,