aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/mtd/ubi/io.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/ubi/io.c b/drivers/mtd/ubi/io.c
index c3bd2e34c642..4cb69925d8d9 100644
--- a/drivers/mtd/ubi/io.c
+++ b/drivers/mtd/ubi/io.c
@@ -481,16 +481,16 @@ static int nor_erase_prepare(struct ubi_device *ubi, int pnum)
481 uint32_t data = 0; 481 uint32_t data = 0;
482 482
483 addr = (loff_t)pnum * ubi->peb_size; 483 addr = (loff_t)pnum * ubi->peb_size;
484 err = ubi->mtd->write(ubi->mtd, addr, 4, &written, &data); 484 err = ubi->mtd->write(ubi->mtd, addr, 4, &written, (void *)&data);
485 if (err) { 485 if (err) {
486 ubi_err("error %d while writing 4 bytes to PEB %d:0, written " 486 ubi_err("error %d while writing 4 bytes to PEB %d:%d, written "
487 "%zd bytes", err, pnum, 0, written); 487 "%zd bytes", err, pnum, 0, written);
488 ubi_dbg_dump_stack(); 488 ubi_dbg_dump_stack();
489 return err; 489 return err;
490 } 490 }
491 491
492 addr += ubi->vid_hdr_aloffset; 492 addr += ubi->vid_hdr_aloffset;
493 err = ubi->mtd->write(ubi->mtd, addr, 4, &written, &data); 493 err = ubi->mtd->write(ubi->mtd, addr, 4, &written, (void *)&data);
494 if (err) { 494 if (err) {
495 ubi_err("error %d while writing 4 bytes to PEB %d:%d, written " 495 ubi_err("error %d while writing 4 bytes to PEB %d:%d, written "
496 "%zd bytes", err, pnum, ubi->vid_hdr_aloffset, written); 496 "%zd bytes", err, pnum, ubi->vid_hdr_aloffset, written);