diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2018-08-29 14:19:35 +0200 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2018-08-31 08:23:29 +0200 |
commit | da673ed8fb8fce4e816685b4481618394892913e (patch) | |
tree | 176810d1c0e7569fc098e3731327cdee17b73ac3 /drivers/mtd/ubi | |
parent | e8e9f6ca347699f48c84f3dfea6353cee8940e29 (diff) | |
download | barebox-da673ed8fb8fce4e816685b4481618394892913e.tar.gz barebox-da673ed8fb8fce4e816685b4481618394892913e.tar.xz |
UBI: fix add_fastmap() to use the vid_hdr passed in argument
add_fastmap() is passed a ubi_vid_hdr pointer in argument, but is
referencing the global vidh pointer.
Even if this is correct from a functional point of view (vidh and vid_hdr
point to the same object), it is confusing.
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Signed-off-by: Teresa Remmet <t.remmet@phytec.de>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mtd/ubi')
-rw-r--r-- | drivers/mtd/ubi/attach.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/attach.c b/drivers/mtd/ubi/attach.c index a5d48932ed..4d3a936ae8 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c @@ -191,8 +191,8 @@ static int add_fastmap(struct ubi_attach_info *ai, int pnum, return -ENOMEM; aeb->pnum = pnum; - aeb->vol_id = be32_to_cpu(vidh->vol_id); - aeb->sqnum = be64_to_cpu(vidh->sqnum); + aeb->vol_id = be32_to_cpu(vid_hdr->vol_id); + aeb->sqnum = be64_to_cpu(vid_hdr->sqnum); aeb->ec = ec; list_add(&aeb->u.list, &ai->fastmap); |