提交 c8cc4525 编写于 作者: A Artem Bityutskiy

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: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
上级 6847e154
...@@ -332,6 +332,7 @@ static int gluebi_create(struct ubi_device_info *di, ...@@ -332,6 +332,7 @@ static int gluebi_create(struct ubi_device_info *di,
} }
gluebi->vol_id = vi->vol_id; gluebi->vol_id = vi->vol_id;
gluebi->ubi_num = vi->ubi_num;
mtd->type = MTD_UBIVOLUME; mtd->type = MTD_UBIVOLUME;
if (!di->ro_mode) if (!di->ro_mode)
mtd->flags = MTD_WRITEABLE; mtd->flags = MTD_WRITEABLE;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册