]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmc: rename random32() to prandom_u32()
authorAkinobu Mita <akinobu.mita@gmail.com>
Tue, 26 Mar 2013 23:26:08 +0000 (10:26 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 4 Apr 2013 06:26:30 +0000 (17:26 +1100)
Use preferable function name which implies using a pseudo-random
number generator.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Chris Ball <cjb@laptop.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/mmc/core/core.c

index ad7decc3340a29b2c482d343d48aee8a22fe2e68..7b435a3e623f9106119ccc4eb8ac55536675571f 100644 (file)
@@ -120,8 +120,8 @@ static void mmc_should_fail_request(struct mmc_host *host,
            !should_fail(&host->fail_mmc_request, data->blksz * data->blocks))
                return;
 
-       data->error = data_errors[random32() % ARRAY_SIZE(data_errors)];
-       data->bytes_xfered = (random32() % (data->bytes_xfered >> 9)) << 9;
+       data->error = data_errors[prandom_u32() % ARRAY_SIZE(data_errors)];
+       data->bytes_xfered = (prandom_u32() % (data->bytes_xfered >> 9)) << 9;
 }
 
 #else /* CONFIG_FAIL_MMC_REQUEST */