summaryrefslogtreecommitdiffstats
path: root/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
diff options
context:
space:
mode:
authorMichael Sparmann <theseven@rockbox.org>2010-03-13 20:28:59 +0000
committerMichael Sparmann <theseven@rockbox.org>2010-03-13 20:28:59 +0000
commita9e732c6df2a83d1c5c31a3d44299ec9e640f467 (patch)
tree4dcd9179cc7b628566888065e2faf844395a477d /firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
parent16587900dae7b2f07e59b93b8acaab8a7047c37e (diff)
downloadrockbox-a9e732c6df2a83d1c5c31a3d44299ec9e640f467.tar.gz
rockbox-a9e732c6df2a83d1c5c31a3d44299ec9e640f467.zip
Fix a bug introduced in r25145
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25148 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c')
-rw-r--r--firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c b/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
index 56547fe3af..2a9b41d08b 100644
--- a/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
+++ b/firmware/target/arm/s5l8700/ipodnano2g/ftl-nano2g.c
@@ -920,9 +920,14 @@ uint32_t ftl_vfl_write(uint32_t vpage, uint32_t count, void* buffer, void* spare
uint32_t i;
for (i = 0; i < count; i++)
{
- uint32_t rc = ftl_vfl_write_single(vpage + i, buffer, sparebuffer);
+ void* databuf = (void*)0;
+ void* sparebuf = (void*)0;
+ if (buffer) databuf = (void*)((uint32_t)buffer + 0x800 * i);
+ if (sparebuffer) sparebuf = (void*)((uint32_t)sparebuffer + 0x40 * i);
+ uint32_t rc = ftl_vfl_write_single(vpage + i, databuf, sparebuf);
if (rc) return rc;
}
+ return 0;
}
#endif