From patchwork Mon Nov 5 16:46:30 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [U-Boot,v2,1/2] ubi: Only read the actual size of the VID header Date: Mon, 05 Nov 2012 06:46:30 -0000 From: Joe Hershberger X-Patchwork-Id: 197223 Message-Id: <1352133991-8712-1-git-send-email-joe.hershberger@ni.com> To: u-boot@lists.denx.de Cc: Tom Rini , Scott Wood , Joe Hershberger If sub-page reads are supported, this will save reading unneeded data Signed-off-by: Joe Hershberger --- drivers/mtd/ubi/io.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c index 8423894..23660e3 100644 --- a/drivers/mtd/ubi/io.c +++ b/drivers/mtd/ubi/io.c @@ -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;