From: Pete Zaitcev Date: Fri, 7 Mar 2008 16:36:54 +0000 (+0100) Subject: ub: fix up the conversion to sg_init_table() X-Git-Tag: v2.6.24.4~62 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=b83b97b0e5185e2c9c80824e2dd880419c200c09;p=karo-tx-linux.git ub: fix up the conversion to sg_init_table() Signed-off-by: Pete Zaitcev Cc: "Oliver Pinter" Cc: FUJITA Tomonori Cc: Greg KH Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Signed-off-by: Chris Wright Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/block/ub.c b/drivers/block/ub.c index 08e909dc7944..7aca46685354 100644 --- a/drivers/block/ub.c +++ b/drivers/block/ub.c @@ -657,7 +657,6 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq) if ((cmd = ub_get_cmd(lun)) == NULL) return -1; memset(cmd, 0, sizeof(struct ub_scsi_cmd)); - sg_init_table(cmd->sgv, UB_MAX_REQ_SG); blkdev_dequeue_request(rq); @@ -668,6 +667,7 @@ static int ub_request_fn_1(struct ub_lun *lun, struct request *rq) /* * get scatterlist from block layer */ + sg_init_table(&urq->sgv[0], UB_MAX_REQ_SG); n_elem = blk_rq_map_sg(lun->disk->queue, rq, &urq->sgv[0]); if (n_elem < 0) { /* Impossible, because blk_rq_map_sg should not hit ENOMEM. */