]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
ubi: Only read the actual size of the VID header
authorJoe Hershberger <joe.hershberger@ni.com>
Tue, 19 Jun 2012 14:46:03 +0000 (09:46 -0500)
committerJohn Linn <john.linn@xilinx.com>
Tue, 19 Jun 2012 21:21:29 +0000 (14:21 -0700)
If sub-page reads are supported, this will save reading unneeded data

Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
drivers/mtd/ubi/io.c

index 8423894000bcc41597c47c80992bbe7134164fec..23660e3dd1e07e219f88adc8a164a88563b8b194 100644 (file)
@@ -916,7 +916,7 @@ int ubi_io_read_vid_hdr(struct ubi_device *ubi, int pnum,
 
        p = (char *)vid_hdr - ubi->vid_hdr_shift;
        err = ubi_io_read(ubi, p, pnum, ubi->vid_hdr_aloffset,
-                         ubi->vid_hdr_alsize);
+                         UBI_VID_HDR_SIZE);
        if (err) {
                if (err != UBI_IO_BITFLIPS && err != -EBADMSG)
                        return err;