aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/tests/mtd_stresstest.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/tests/mtd_stresstest.c')
-rw-r--r--drivers/mtd/tests/mtd_stresstest.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/mtd/tests/mtd_stresstest.c b/drivers/mtd/tests/mtd_stresstest.c
index 3729f679ae5d..1d29739db916 100644
--- a/drivers/mtd/tests/mtd_stresstest.c
+++ b/drivers/mtd/tests/mtd_stresstest.c
@@ -55,7 +55,7 @@ static int rand_eb(void)
55 unsigned int eb; 55 unsigned int eb;
56 56
57again: 57again:
58 eb = random32(); 58 eb = prandom_u32();
59 /* Read or write up 2 eraseblocks at a time - hence 'ebcnt - 1' */ 59 /* Read or write up 2 eraseblocks at a time - hence 'ebcnt - 1' */
60 eb %= (ebcnt - 1); 60 eb %= (ebcnt - 1);
61 if (bbt[eb]) 61 if (bbt[eb])
@@ -67,7 +67,7 @@ static int rand_offs(void)
67{ 67{
68 unsigned int offs; 68 unsigned int offs;
69 69
70 offs = random32(); 70 offs = prandom_u32();
71 offs %= bufsize; 71 offs %= bufsize;
72 return offs; 72 return offs;
73} 73}
@@ -76,7 +76,7 @@ static int rand_len(int offs)
76{ 76{
77 unsigned int len; 77 unsigned int len;
78 78
79 len = random32(); 79 len = prandom_u32();
80 len %= (bufsize - offs); 80 len %= (bufsize - offs);
81 return len; 81 return len;
82} 82}
@@ -191,7 +191,7 @@ static int do_write(void)
191 191
192static int do_operation(void) 192static int do_operation(void)
193{ 193{
194 if (random32() & 1) 194 if (prandom_u32() & 1)
195 return do_read(); 195 return do_read();
196 else 196 else
197 return do_write(); 197 return do_write();