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/sg.c | |
parent | d32311fed70d12f14e585feb4653571b1e2b0e6d (diff) | |
download | linux-3.10-378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c.tar.gz linux-3.10-378f058cc49bcda7fa63d3cd86d2f9a0a5188b1c.tar.bz2 linux-3.10-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/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 861e51375d7..07fee811c09 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 */ #include <linux/seq_file.h> #include <linux/blkdev.h> #include <linux/delay.h> +#include <linux/scatterlist.h> #include "scsi.h" #include <scsi/scsi_dbg.h> @@ -1992,9 +1993,7 @@ sg_build_indirect(Sg_scatter_hold * schp, Sg_fd * sfp, int buff_size) if (!p) break; } - sclp->page = virt_to_page(p); - sclp->offset = offset_in_page(p); - sclp->length = ret_sz; + sg_set_buf(sclp, p, ret_sz); SCSI_LOG_TIMEOUT(5, printk("sg_build_build: k=%d, a=0x%p, len=%d\n", k, sg_scatg2virt(sclp), ret_sz)); |