]> pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - drivers/mtd/ubi/gluebi.c
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
[linux-2.6-omap-h63xx.git] / drivers / mtd / ubi / gluebi.c
index d397219238d3b8ede00b4075b1468c1922963d79..e909b390069a263e63d5d80a9a8bdf239644fb9f 100644 (file)
@@ -291,11 +291,12 @@ int ubi_create_gluebi(struct ubi_device *ubi, struct ubi_volume *vol)
        /*
         * In case of dynamic volume, MTD device size is just volume size. In
         * case of a static volume the size is equivalent to the amount of data
-        * bytes, which is zero at this moment and will be changed after volume
-        * update.
+        * bytes.
         */
        if (vol->vol_type == UBI_DYNAMIC_VOLUME)
                mtd->size = vol->usable_leb_size * vol->reserved_pebs;
+       else
+               mtd->size = vol->used_bytes;
 
        if (add_mtd_device(mtd)) {
                ubi_err("cannot not add MTD device\n");