Messages in this thread Patch in this message | | | Subject | [PATCH 04 of 12] random: reuse rand_initialize | Date | Thu, 17 Jan 2008 20:33:46 -0600 | From | Matt Mackall <> |
| |
Signed-off-by: Matt Mackall <mpm@selenic.com>
diff -r 6f8bed9c59f7 -r 3e0b0226df90 drivers/char/random.c --- a/drivers/char/random.c Thu Jan 17 20:25:23 2008 -0600 +++ b/drivers/char/random.c Thu Jan 17 20:25:23 2008 -0600 @@ -900,7 +900,7 @@ sizeof(*(utsname()))/4); } -static int __init rand_initialize(void) +static int rand_initialize(void) { init_std_data(&input_pool); init_std_data(&blocking_pool); @@ -1102,9 +1102,7 @@ /* 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;
| |