diff options
author | Boris Brezillon <boris.brezillon@free-electrons.com> | 2016-09-16 16:59:18 +0200 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2016-10-02 22:48:14 +0200 |
commit | 91f4285fe389a2729efcd5db642d7652d8f27a40 (patch) | |
tree | b2c5374b3457c9a8b955b3a63d3651e2cfb1736b /drivers/mtd/ubi/ubi.h | |
parent | UBI: fastmap: use ubi_io_{read, write}_data() instead of ubi_io_{read, write}() (diff) | |
download | linux-91f4285fe389a2729efcd5db642d7652d8f27a40.tar.xz linux-91f4285fe389a2729efcd5db642d7652d8f27a40.zip |
UBI: provide helpers to allocate and free aeb elements
This not only hides the aeb allocation internals (which is always good in
case we ever want to change the allocation system), but also helps us
factorize the initialization of some common fields (ec and pnum).
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r-- | drivers/mtd/ubi/ubi.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h index fce142666bf3..f22c6c2e980f 100644 --- a/drivers/mtd/ubi/ubi.h +++ b/drivers/mtd/ubi/ubi.h @@ -792,6 +792,9 @@ extern struct mutex ubi_devices_mutex; extern struct blocking_notifier_head ubi_notifiers; /* attach.c */ +struct ubi_ainf_peb *ubi_alloc_aeb(struct ubi_attach_info *ai, int pnum, + int ec); +void ubi_free_aeb(struct ubi_attach_info *ai, struct ubi_ainf_peb *aeb); int ubi_add_to_av(struct ubi_device *ubi, struct ubi_attach_info *ai, int pnum, int ec, const struct ubi_vid_hdr *vid_hdr, int bitflips); struct ubi_ainf_volume *ubi_add_av(struct ubi_attach_info *ai, int vol_id); |