From 3d1266c7042e696704e22085a0f55c714bc06194 Mon Sep 17 00:00:00 2001 From: Jens Axboe Date: Wed, 24 Oct 2007 13:21:21 +0200 Subject: SG: audit of drivers that use blk_rq_map_sg() They need to properly init the sg table, or blk_rq_map_sg() will complain if CONFIG_DEBUG_SG is set. Signed-off-by: Jens Axboe --- drivers/cdrom/viocd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'drivers/cdrom') diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 880b5dce3a6..d8bb44b98a6 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c @@ -41,9 +41,9 @@ #include #include #include +#include #include -#include #include #include #include @@ -258,6 +258,7 @@ static int send_request(struct request *req) cmd = viomajorsubtype_cdio | viocdwrite; } + sg_init_table(&sg, 1); if (blk_rq_map_sg(req->q, req, &sg) == 0) { printk(VIOCD_KERN_WARNING "error setting up scatter/gather list\n"); -- cgit v1.2.3