mtd: mtd_speedtest: use prandom_bytes
[~shefty/rdma-dev.git] / drivers / mtd / tests / mtd_speedtest.c
index 596cbea..a6ce9c1 100644 (file)
@@ -49,13 +49,6 @@ static int pgcnt;
 static int goodebcnt;
 static struct timeval start, finish;
 
 static int goodebcnt;
 static struct timeval start, finish;
 
-static void set_random_data(unsigned char *buf, size_t len)
-{
-       size_t i;
-
-       for (i = 0; i < len; ++i)
-               buf[i] = random32();
-}
 
 static int erase_eraseblock(int ebnum)
 {
 
 static int erase_eraseblock(int ebnum)
 {
@@ -396,7 +389,7 @@ static int __init mtd_speedtest_init(void)
                goto out;
        }
 
                goto out;
        }
 
-       set_random_data(iobuf, mtd->erasesize);
+       prandom_bytes(iobuf, mtd->erasesize);
 
        err = scan_for_bad_eraseblocks();
        if (err)
 
        err = scan_for_bad_eraseblocks();
        if (err)