aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-07-10 09:59:36 -0400
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-07-15 04:30:55 -0400
commitc8cc452501572d4a81331179b00a9bdd5d2bfada (patch)
tree8db50707575afe3c36d35a2a5d07c05fe2d58e26 /drivers/mtd/ubi
parent6847e154e3cd74fca6084124c097980a7634285a (diff)
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 <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r--drivers/mtd/ubi/gluebi.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/gluebi.c b/drivers/mtd/ubi/gluebi.c
index 95aaac03f938..b5e478fa2661 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,
332 } 332 }
333 333
334 gluebi->vol_id = vi->vol_id; 334 gluebi->vol_id = vi->vol_id;
335 gluebi->ubi_num = vi->ubi_num;
335 mtd->type = MTD_UBIVOLUME; 336 mtd->type = MTD_UBIVOLUME;
336 if (!di->ro_mode) 337 if (!di->ro_mode)
337 mtd->flags = MTD_WRITEABLE; 338 mtd->flags = MTD_WRITEABLE;