[SCSI] fix simscsi
authorChristoph Hellwig <hch@lst.de>
Fri, 28 Jul 2006 07:01:36 +0000 (09:01 +0200)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Fri, 28 Jul 2006 18:39:49 +0000 (13:39 -0500)
On Thu, Jul 27, 2006 at 01:03:24AM -0700, Andrew Morton wrote:
> arch/ia64/hp/sim/simscsi.c: In function `simscsi_sg_readwrite':
> arch/ia64/hp/sim/simscsi.c:154: error: structure has no member named `buffer'
> arch/ia64/hp/sim/simscsi.c: In function `simscsi_fillresult':
> arch/ia64/hp/sim/simscsi.c:247: error: structure has no member named `buffer'
> arch/ia64/hp/sim/simscsi.c: At top level:
> arch/ia64/hp/sim/simscsi.c:87: warning: 'simscsi_setup' defined but not used

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
arch/ia64/hp/sim/simscsi.c

index a3fe975..8f0a16a 100644 (file)
@@ -151,7 +151,7 @@ static void
 simscsi_sg_readwrite (struct scsi_cmnd *sc, int mode, unsigned long offset)
 {
        int list_len = sc->use_sg;
-       struct scatterlist *sl = (struct scatterlist *)sc->buffer;
+       struct scatterlist *sl = (struct scatterlist *)sc->request_buffer;
        struct disk_stat stat;
        struct disk_req req;
 
@@ -244,7 +244,8 @@ static void simscsi_fillresult(struct scsi_cmnd *sc, char *buf, unsigned len)
 
        if (scatterlen == 0)
                memcpy(sc->request_buffer, buf, len);
-       else for (slp = (struct scatterlist *)sc->buffer; scatterlen-- > 0 && len > 0; slp++) {
+       else for (slp = (struct scatterlist *)sc->request_buffer;
+                 scatterlen-- > 0 && len > 0; slp++) {
                unsigned thislen = min(len, slp->length);
 
                memcpy(page_address(slp->page) + slp->offset, buf, thislen);