From: Artem Bityutskiy Date: Fri, 10 Jul 2009 13:59:36 +0000 (+0300) Subject: UBI: gluebi: initialize ubi_num field X-Git-Tag: Release-2010-05/1~3^2~26 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7981a3ac69853fd6fa5dcebd03548691cfd0fe81;p=pandora-kernel.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 118de292b9cd..9d93d1eda4fc 100644 --- a/drivers/mtd/ubi/gluebi.c +++ b/drivers/mtd/ubi/gluebi.c @@ -340,6 +340,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;