aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/arm/scsi.h
diff options
context:
space:
mode:
authorDavid Hardeman <david@2gen.com>2005-09-17 03:55:31 -0400
committerHerbert Xu <herbert@gondor.apana.org.au>2005-10-29 20:19:43 -0400
commit378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c (patch)
treeed99548aa459054c7b046f0ac96af2cc50683e6e /drivers/scsi/arm/scsi.h
parentd32311fed70d12f14e585feb4653571b1e2b0e6d (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/scsi.h')
-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 @@
10 * Commonly used scsi driver functions. 10 * Commonly used scsi driver functions.
11 */ 11 */
12 12
13#include <linux/scatterlist.h>
14
13#define BELT_AND_BRACES 15#define BELT_AND_BRACES
14 16
15/* 17/*
@@ -22,9 +24,7 @@ static inline int copy_SCp_to_sg(struct scatterlist *sg, Scsi_Pointer *SCp, int
22 24
23 BUG_ON(bufs + 1 > max); 25 BUG_ON(bufs + 1 > max);
24 26
25 sg->page = virt_to_page(SCp->ptr); 27 sg_set_buf(sg, SCp->ptr, SCp->this_residual);
26 sg->offset = offset_in_page(SCp->ptr);
27 sg->length = SCp->this_residual;
28 28
29 if (bufs) 29 if (bufs)
30 memcpy(sg + 1, SCp->buffer + 1, 30 memcpy(sg + 1, SCp->buffer + 1,