summaryrefslogtreecommitdiffstats
path: root/drivers/mtd/ubi
diff options
context:
space:
mode:
authorArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-07-08 09:15:41 +0200
committerArtem Bityutskiy <Artem.Bityutskiy@nokia.com>2009-07-08 09:15:41 +0200
commit83c2099f5e1f0a4621ed4f20fc539069c636a24b (patch)
tree0a9cbeeb77330a853663162d406eee9d0174e29a /drivers/mtd/ubi
parentUBI: fix NOR flash recovery (diff)
downloadlinux-83c2099f5e1f0a4621ed4f20fc539069c636a24b.tar.xz
linux-83c2099f5e1f0a4621ed4f20fc539069c636a24b.zip
UBI: fix compilation warnings
The recent "UBI: fix NOR flash recovery" introduced compilation warnings which were immediately spotted by our linux-next keeper. This patch fixes them. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Diffstat (limited to 'drivers/mtd/ubi')
-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)
uint32_t data = 0;
addr = (loff_t)pnum * ubi->peb_size;
- err = ubi->mtd->write(ubi->mtd, addr, 4, &written, &data);
+ err = ubi->mtd->write(ubi->mtd, addr, 4, &written, (void *)&data);
if (err) {
- ubi_err("error %d while writing 4 bytes to PEB %d:0, written "
+ ubi_err("error %d while writing 4 bytes to PEB %d:%d, written "
"%zd bytes", err, pnum, 0, written);
ubi_dbg_dump_stack();
return err;
}
addr += ubi->vid_hdr_aloffset;
- err = ubi->mtd->write(ubi->mtd, addr, 4, &written, &data);
+ err = ubi->mtd->write(ubi->mtd, addr, 4, &written, (void *)&data);
if (err) {
ubi_err("error %d while writing 4 bytes to PEB %d:%d, written "
"%zd bytes", err, pnum, ubi->vid_hdr_aloffset, written);