aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Mackall <mpm@selenic.com>2008-04-29 01:02:58 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-04-29 08:06:24 -0700
commit53c3f63e824764da23676e5c718755ff4aac9b63 (patch)
treeb17b87f69d1437361725ff809796d48604849eeb
parent43ae4860ff4a358c29b9d364e45c2d09ad9fa067 (diff)
random: reuse rand_initialize
Signed-off-by: Matt Mackall <mpm@selenic.com> Cc: Theodore Ts'o <tytso@mit.edu> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
-rw-r--r--drivers/char/random.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/random.c b/drivers/char/random.c
index 964d78d3157..a2329a11e13 100644
--- a/drivers/char/random.c
+++ b/drivers/char/random.c
@@ -899,7 +899,7 @@ static void init_std_data(struct entropy_store *r)
sizeof(*(utsname()))/4);
}
-static int __init rand_initialize(void)
+static int rand_initialize(void)
{
init_std_data(&input_pool);
init_std_data(&blocking_pool);
@@ -1101,9 +1101,7 @@ static long random_ioctl(struct file *f, unsigned int cmd, unsigned long arg)
/* Clear the entropy pool counters. */
if (!capable(CAP_SYS_ADMIN))
return -EPERM;
- init_std_data(&input_pool);
- init_std_data(&blocking_pool);
- init_std_data(&nonblocking_pool);
+ rand_initialize();
return 0;
default:
return -EINVAL;