]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/mtd/tests/mtd_stresstest.c
Merge tag 'for-linus-20130301' of git://git.infradead.org/linux-mtd
[karo-tx-linux.git] / drivers / mtd / tests / mtd_stresstest.c
index 2d7e6cffd6d4d50deeca85564e39e200be34e670..787f539d16ca436099826f0626bb4c57efe6da6d 100644 (file)
@@ -55,7 +55,7 @@ static int rand_eb(void)
        unsigned int eb;
 
 again:
-       eb = random32();
+       eb = prandom_u32();
        /* Read or write up 2 eraseblocks at a time - hence 'ebcnt - 1' */
        eb %= (ebcnt - 1);
        if (bbt[eb])
@@ -67,7 +67,7 @@ static int rand_offs(void)
 {
        unsigned int offs;
 
-       offs = random32();
+       offs = prandom_u32();
        offs %= bufsize;
        return offs;
 }
@@ -76,7 +76,7 @@ static int rand_len(int offs)
 {
        unsigned int len;
 
-       len = random32();
+       len = prandom_u32();
        len %= (bufsize - offs);
        return len;
 }
@@ -191,7 +191,7 @@ static int do_write(void)
 
 static int do_operation(void)
 {
-       if (random32() & 1)
+       if (prandom_u32() & 1)
                return do_read();
        else
                return do_write();