diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-09-16 10:59:10 -0400 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2016-10-02 16:48:14 -0400 |
commit | 3f84e454eb6cd712bf1fed6870df46bfe8c772f0 (patch) | |
tree | fed568a813892fec2061c88b2a23ecbd23afd09d | |
parent | f5f9d43f0a61e636008e2325c1c6178bd5b0da27 (diff) |
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>
-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 903becd31410..95138ae2062f 100644 --- a/drivers/mtd/ubi/attach.c +++ b/drivers/mtd/ubi/attach.c | |||
@@ -197,8 +197,8 @@ static int add_fastmap(struct ubi_attach_info *ai, int pnum, | |||
197 | return -ENOMEM; | 197 | return -ENOMEM; |
198 | 198 | ||
199 | aeb->pnum = pnum; | 199 | aeb->pnum = pnum; |
200 | aeb->vol_id = be32_to_cpu(vidh->vol_id); | 200 | aeb->vol_id = be32_to_cpu(vid_hdr->vol_id); |
201 | aeb->sqnum = be64_to_cpu(vidh->sqnum); | 201 | aeb->sqnum = be64_to_cpu(vid_hdr->sqnum); |
202 | aeb->ec = ec; | 202 | aeb->ec = ec; |
203 | list_add(&aeb->u.list, &ai->fastmap); | 203 | list_add(&aeb->u.list, &ai->fastmap); |
204 | 204 | ||