summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-11-08 19:02:06 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2013-07-25 10:24:16 +0200
commit50f75a1a0e3c51fca1576bd41588d6e71caff02e (patch)
tree962ab1e2d69db1dc451a19e7185fdeda9c2ed924 /lib
parent10f7528afbc9dfa232c02f8a2b45857858fc64b4 (diff)
downloadbarebox-50f75a1a0e3c51fca1576bd41588d6e71caff02e.tar.gz
barebox-50f75a1a0e3c51fca1576bd41588d6e71caff02e.tar.xz
UBI: reimport UBI from Linux v3.10
This is a fresh UBI import from Linux v3.10 This is done mainly to get fastmap support. This was tested with the i.MX nand driver, the MXS nand driver and on CFI NOR flash. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/random.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/random.c b/lib/random.c
index 352d6bf3f7..14c7da119d 100644
--- a/lib/random.c
+++ b/lib/random.c
@@ -18,8 +18,10 @@ void srand(unsigned int seed)
random_seed = seed;
}
-void get_random_bytes(char *buf, int len)
+void get_random_bytes(void *_buf, int len)
{
+ char *buf = _buf;
+
while (len--)
*buf++ = rand() % 256;
}