mmc: rename random32() to prandom_u32()
authorAkinobu Mita <akinobu.mita@gmail.com>
Mon, 29 Apr 2013 23:21:31 +0000 (16:21 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Tue, 30 Apr 2013 01:28:42 +0000 (18:28 -0700)
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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/mmc/core/core.c

index 08a3cf2a7610882c3e2957a61e9318604adeeaa4..9290bb51a06acd916b4524e61d7cd2483afb2729 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 */