aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi/gluebi.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/ubi/gluebi.c')
-rw-r--r--drivers/mtd/ubi/gluebi.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/mtd/ubi/gluebi.c b/drivers/mtd/ubi/gluebi.c
index 41ff74c60e14..d397219238d3 100644
--- a/drivers/mtd/ubi/gluebi.c
+++ b/drivers/mtd/ubi/gluebi.c
@@ -129,8 +129,7 @@ static int gluebi_read(struct mtd_info *mtd, loff_t from, size_t len,
129 if (to_read > total_read) 129 if (to_read > total_read)
130 to_read = total_read; 130 to_read = total_read;
131 131
132 err = ubi_eba_read_leb(ubi, vol->vol_id, lnum, buf, offs, 132 err = ubi_eba_read_leb(ubi, vol, lnum, buf, offs, to_read, 0);
133 to_read, 0);
134 if (err) 133 if (err)
135 break; 134 break;
136 135
@@ -187,8 +186,8 @@ static int gluebi_write(struct mtd_info *mtd, loff_t to, size_t len,
187 if (to_write > total_written) 186 if (to_write > total_written)
188 to_write = total_written; 187 to_write = total_written;
189 188
190 err = ubi_eba_write_leb(ubi, vol->vol_id, lnum, buf, offs, 189 err = ubi_eba_write_leb(ubi, vol, lnum, buf, offs, to_write,
191 to_write, UBI_UNKNOWN); 190 UBI_UNKNOWN);
192 if (err) 191 if (err)
193 break; 192 break;
194 193
@@ -237,7 +236,7 @@ static int gluebi_erase(struct mtd_info *mtd, struct erase_info *instr)
237 return -EROFS; 236 return -EROFS;
238 237
239 for (i = 0; i < count; i++) { 238 for (i = 0; i < count; i++) {
240 err = ubi_eba_unmap_leb(ubi, vol->vol_id, lnum + i); 239 err = ubi_eba_unmap_leb(ubi, vol, lnum + i);
241 if (err) 240 if (err)
242 goto out_err; 241 goto out_err;
243 } 242 }