summaryrefslogtreecommitdiff
path: root/drivers/mtd/tests/mtd_stresstest.c
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2013-01-03 12:19:13 (GMT)
committerArtem Bityutskiy <artem.bityutskiy@linux.intel.com>2013-02-04 07:26:28 (GMT)
commitaca662a3b1c9b178536267da9fb2f0faa798cb7f (patch)
treee75eea8674411ec01fd03d689d59f0727a487fca /drivers/mtd/tests/mtd_stresstest.c
parentbd6ce5ef913a7b4dfe5cd5028309346d32a8c404 (diff)
downloadlinux-fsl-qoriq-aca662a3b1c9b178536267da9fb2f0faa798cb7f.tar.xz
mtd: rename random32() to prandom_u32()
Use more preferable function name which implies using a pseudo-random number generator. Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com> Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
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 3729f67..1d29739 100644
--- a/drivers/mtd/tests/mtd_stresstest.c
+++ b/drivers/mtd/tests/mtd_stresstest.c
@@ -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();