summaryrefslogtreecommitdiff
path: root/drivers/mtd/ubi/ubi.h
diff options
context:
space:
mode:
authorXiaochuan-Xu <xiaochuan-xu@cqu.edu.cn>2008-12-09 19:44:12 +0800
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2008-12-15 19:34:50 +0200
commit23553b2c08c9b6e96be98c44feb9c5e640d3e789 (patch)
tree222756174c6f0194b9f34b7448ba3976ed0032cf /drivers/mtd/ubi/ubi.h
parentad5942bad6addcf9697a74413b517d9724d803a4 (diff)
UBI: prepare for protection tree improvements
This patch modifies @struct ubi_wl_entry and adds union which contains only one element so far. This is just a preparation for further changes which will kill the protection tree and make UBI use a list instead. Signed-off-by: Xiaochuan-Xu <xiaochuan-xu@cqu.edu.cn> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi/ubi.h')
-rw-r--r--drivers/mtd/ubi/ubi.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/mtd/ubi/ubi.h b/drivers/mtd/ubi/ubi.h
index 1c3fa18c26a7..46a4763f8e7c 100644
--- a/drivers/mtd/ubi/ubi.h
+++ b/drivers/mtd/ubi/ubi.h
@@ -95,7 +95,7 @@ enum {
/**
* struct ubi_wl_entry - wear-leveling entry.
- * @rb: link in the corresponding RB-tree
+ * @u.rb: link in the corresponding (free/used) RB-tree
* @ec: erase counter
* @pnum: physical eraseblock number
*
@@ -104,7 +104,9 @@ enum {
* RB-trees. See WL sub-system for details.
*/
struct ubi_wl_entry {
- struct rb_node rb;
+ union {
+ struct rb_node rb;
+ } u;
int ec;
int pnum;
};