diff options
Diffstat (limited to 'drivers/mtd/ubi/upd.c')
-rw-r--r-- | drivers/mtd/ubi/upd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/upd.c b/drivers/mtd/ubi/upd.c index 1230a5e1b530..3b8beb8545c4 100644 --- a/drivers/mtd/ubi/upd.c +++ b/drivers/mtd/ubi/upd.c | |||
@@ -39,7 +39,7 @@ | |||
39 | */ | 39 | */ |
40 | 40 | ||
41 | #include <linux/err.h> | 41 | #include <linux/err.h> |
42 | #include <asm/uaccess.h> | 42 | #include <linux/uaccess.h> |
43 | #include <asm/div64.h> | 43 | #include <asm/div64.h> |
44 | #include "ubi.h" | 44 | #include "ubi.h" |
45 | 45 | ||
@@ -246,7 +246,8 @@ static int write_leb(struct ubi_device *ubi, struct ubi_volume *vol, int lnum, | |||
246 | return 0; | 246 | return 0; |
247 | } | 247 | } |
248 | 248 | ||
249 | err = ubi_eba_write_leb(ubi, vol, lnum, buf, 0, len, UBI_UNKNOWN); | 249 | err = ubi_eba_write_leb(ubi, vol, lnum, buf, 0, len, |
250 | UBI_UNKNOWN); | ||
250 | } else { | 251 | } else { |
251 | /* | 252 | /* |
252 | * When writing static volume, and this is the last logical | 253 | * When writing static volume, and this is the last logical |
@@ -418,7 +419,8 @@ int ubi_more_leb_change_data(struct ubi_device *ubi, struct ubi_volume *vol, | |||
418 | if (vol->upd_received == vol->upd_bytes) { | 419 | if (vol->upd_received == vol->upd_bytes) { |
419 | int len = ALIGN((int)vol->upd_bytes, ubi->min_io_size); | 420 | int len = ALIGN((int)vol->upd_bytes, ubi->min_io_size); |
420 | 421 | ||
421 | memset(vol->upd_buf + vol->upd_bytes, 0xFF, len - vol->upd_bytes); | 422 | memset(vol->upd_buf + vol->upd_bytes, 0xFF, |
423 | len - vol->upd_bytes); | ||
422 | len = ubi_calc_data_len(ubi, vol->upd_buf, len); | 424 | len = ubi_calc_data_len(ubi, vol->upd_buf, len); |
423 | err = ubi_eba_atomic_leb_change(ubi, vol, vol->ch_lnum, | 425 | err = ubi_eba_atomic_leb_change(ubi, vol, vol->ch_lnum, |
424 | vol->upd_buf, len, UBI_UNKNOWN); | 426 | vol->upd_buf, len, UBI_UNKNOWN); |