diff options
author | David Hardeman <david@2gen.com> | 2005-09-17 03:55:31 -0400 |
---|---|---|
committer | Herbert Xu <herbert@gondor.apana.org.au> | 2005-10-29 20:19:43 -0400 |
commit | 378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c (patch) | |
tree | ed99548aa459054c7b046f0ac96af2cc50683e6e /drivers/scsi/sg.c | |
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/sg.c')
-rw-r--r-- | drivers/scsi/sg.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/scsi/sg.c b/drivers/scsi/sg.c index 861e51375d70..07fee811c09e 100644 --- a/drivers/scsi/sg.c +++ b/drivers/scsi/sg.c | |||
@@ -49,6 +49,7 @@ static int sg_version_num = 30533; /* 2 digits for each component */ | |||
49 | #include <linux/seq_file.h> | 49 | #include <linux/seq_file.h> |
50 | #include <linux/blkdev.h> | 50 | #include <linux/blkdev.h> |
51 | #include <linux/delay.h> | 51 | #include <linux/delay.h> |
52 | #include <linux/scatterlist.h> | ||
52 | 53 | ||
53 | #include "scsi.h" | 54 | #include "scsi.h" |
54 | #include <scsi/scsi_dbg.h> | 55 | #include <scsi/scsi_dbg.h> |
@@ -1992,9 +1993,7 @@ sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size) | |||
1992 | if (!p) | 1993 | if (!p) |
1993 | break; | 1994 | break; |
1994 | } | 1995 | } |
1995 | sclp->page = virt_to_page(p); | 1996 | sg_set_buf(sclp, p, ret_sz); |
1996 | sclp->offset = offset_in_page(p); | ||
1997 | sclp->length = ret_sz; | ||
1998 | 1997 | ||
1999 | SCSI_LOG_TIMEOUT(5, printk("sg_build_build: k=%d, a=0x%p, len=%d\n", | 1998 | SCSI_LOG_TIMEOUT(5, printk("sg_build_build: k=%d, a=0x%p, len=%d\n", |
2000 | k, sg_scatg2virt(sclp), ret_sz)); | 1999 | k, sg_scatg2virt(sclp), ret_sz)); |