From: Artem Bityutskiy Date: Fri, 10 Jul 2009 13:59:36 +0000 (+0300) Subject: UBI: gluebi: initialize ubi_num field X-Git-Tag: v3.0~8417^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c8cc452501572d4a81331179b00a9bdd5d2bfada;p=platform%2Fkernel%2Flinux-amlogic.git UBI: gluebi: initialize ubi_num field Do not forget to initialize 'gluebi->ubi_num' because otherwise it will stay 0 even for ubi1 device, and gluebi will open wrong UBI device when 'gluebi_get_device()' is called. Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/ubi/gluebi.c b/drivers/mtd/ubi/gluebi.c index 95aaac0..b5e478f 100644 --- a/drivers/mtd/ubi/gluebi.c +++ b/drivers/mtd/ubi/gluebi.c @@ -332,6 +332,7 @@ static int gluebi_create(struct ubi_device_info *di, } gluebi->vol_id = vi->vol_id; + gluebi->ubi_num = vi->ubi_num; mtd->type = MTD_UBIVOLUME; if (!di->ro_mode) mtd->flags = MTD_WRITEABLE;